Skip to main content
Glama

create_database_backup

Back up a database by specifying server and database IDs. This tool creates a copy of the database for data protection and disaster recovery.

Instructions

Create a backup of a database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_idYesThe ID of the server
database_idYesThe ID of the database to backup

Implementation Reference

  • The create_database_backup tool handler — defines the tool with Zod schema for server_id and database_id, then calls client.createDatabaseBackup and returns a success message.
    server.tool(
      "create_database_backup",
      "Create a backup of a database",
      {
        server_id: z.coerce.number().describe("The ID of the server"),
        database_id: z.coerce.number().describe("The ID of the database to backup"),
      },
      async ({ server_id, database_id }) => {
        await client.createDatabaseBackup(server_id, database_id);
        return {
          content: [
            {
              type: "text" as const,
              text: `Backup initiated for database ${database_id} on server ${server_id}`,
            },
          ],
        };
      }
    );
  • Input schema for create_database_backup: requires server_id (number) and database_id (number), both coerced from strings.
    {
      server_id: z.coerce.number().describe("The ID of the server"),
      database_id: z.coerce.number().describe("The ID of the database to backup"),
    },
  • The registerDatabaseTools function registers create_database_backup (and list_databases) on the MCP server via server.tool(). Called from tools/index.ts.
    export function registerDatabaseTools(server: McpServer, client: PloiClient) {
      server.tool(
        "list_databases",
        "List databases on a server",
        {
          server_id: z.coerce.number().describe("The ID of the server"),
        },
        async ({ server_id }) => {
          const databases = await client.listDatabases(server_id);
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(databases, null, 2),
              },
            ],
          };
        }
      );
    
      server.tool(
        "create_database_backup",
        "Create a backup of a database",
        {
          server_id: z.coerce.number().describe("The ID of the server"),
          database_id: z.coerce.number().describe("The ID of the database to backup"),
        },
        async ({ server_id, database_id }) => {
          await client.createDatabaseBackup(server_id, database_id);
          return {
            content: [
              {
                type: "text" as const,
                text: `Backup initiated for database ${database_id} on server ${server_id}`,
              },
            ],
          };
        }
      );
    }
  • The PloiClient.createDatabaseBackup method that actually makes the HTTP POST request to /servers/{serverId}/databases/{databaseId}/backup.
    async createDatabaseBackup(
      serverId: number,
      databaseId: number
    ): Promise<void> {
      await this.request<void>(
        "POST",
        `/servers/${serverId}/databases/${databaseId}/backup`
      );
    }
  • src/index.ts:127-127 (registration)
    Top-level registration: registerAllTools(server, client) is called, which in turn calls registerDatabaseTools.
    registerAllTools(server, client);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full burden. It does not disclose whether the backup is synchronous or asynchronous, if it overwrites previous backups, or any side effects. Minimal transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single efficient sentence. While it omits details, it is front-loaded and wastes no words. Could be improved without increasing length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description should provide richer context. It does not explain what happens after backup creation (e.g., return value, confirmation, storage location), leaving gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but parameter descriptions are repetitive. The tool description adds no meaning beyond the schema, meeting the baseline but providing no extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it creates a database backup, which is a specific verb+resource. It distinguishes from siblings as no other sibling is a backup tool, but lacks precision about scope (e.g., immediate vs scheduled).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives, no prerequisites, no when-not-to-use information. The description offers no context for decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/sudanese/ploi-mcp'

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