Skip to main content
Glama
Yonsn76

MyPos MCP

by Yonsn76

eliminarTabla

Permanently delete entire tables from MySQL or PostgreSQL databases. Requires exact confirmation phrase for safety and only removes complete tables, not individual records or columns.

Instructions

Sigue estas reglas OBLIGATORIAS para eliminar una tabla: ADVERTENCIA INICIAL: Informa al usuario que esta es una acción DESTRUCTIVA y PERMANENTE que no se puede deshacer. CONFIRMACIÓN EXPLÍCITA: Para proceder, el usuario DEBE escribir la frase exacta: "Confirmar eliminación de la tabla [nombreTabla]", reemplazando [nombreTabla] con el nombre de la tabla a eliminar. VERIFICACIÓN ESTRICTA: No ejecutes la eliminación si la frase de confirmación del usuario no es una coincidencia exacta. USO EXCLUSIVO: Recuerda que esta herramienta solo elimina tablas completas, NUNCA registros o columnas individuales.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nombreTablaYesNombre exacto de la tabla que se va a eliminar

Implementation Reference

  • The handler function that executes the logic for the 'eliminarTabla' tool: checks input, quotes the table name, drops the table using query_runner.runQuery, and returns success or error message.
    async ({ nombreTabla }) => {
      try {
        if (!nombreTabla) {
          return { isError: true, content: [{ type: 'text', text: 'Debes proporcionar el nombre de la tabla.' }] };
        }
        await query_runner.runQuery(`DROP TABLE IF EXISTS ${quoteIdent(nombreTabla)}`);
        return { content: [{ type: 'text', text: `Tabla '${nombreTabla}' eliminada exitosamente.` }] };
      } catch (e) {
        return { isError: true, content: [{ type: 'text', text: 'Error al eliminar la tabla: ' + (e.message || e) }] };
      }
    }
  • Zod input schema defining the required 'nombreTabla' parameter.
      nombreTabla: z.string().describe('Nombre exacto de la tabla que se va a eliminar'),
    },
  • mcp_server.js:540-561 (registration)
    Registration of the 'eliminarTabla' tool using server.tool(), including description, schema, and inline handler.
    server.tool(
      'eliminarTabla',
      'Sigue estas reglas OBLIGATORIAS para eliminar una tabla:\n'
      + 'ADVERTENCIA INICIAL: Informa al usuario que esta es una acción DESTRUCTIVA y PERMANENTE que no se puede deshacer.\n'
      + 'CONFIRMACIÓN EXPLÍCITA: Para proceder, el usuario DEBE escribir la frase exacta: "Confirmar eliminación de la tabla [nombreTabla]", reemplazando [nombreTabla] con el nombre de la tabla a eliminar.\n'
      + 'VERIFICACIÓN ESTRICTA: No ejecutes la eliminación si la frase de confirmación del usuario no es una coincidencia exacta.\n'
      + 'USO EXCLUSIVO: Recuerda que esta herramienta solo elimina tablas completas, NUNCA registros o columnas individuales.',
      {
        nombreTabla: z.string().describe('Nombre exacto de la tabla que se va a eliminar'),
      },
      async ({ nombreTabla }) => {
        try {
          if (!nombreTabla) {
            return { isError: true, content: [{ type: 'text', text: 'Debes proporcionar el nombre de la tabla.' }] };
          }
          await query_runner.runQuery(`DROP TABLE IF EXISTS ${quoteIdent(nombreTabla)}`);
          return { content: [{ type: 'text', text: `Tabla '${nombreTabla}' eliminada exitosamente.` }] };
        } catch (e) {
          return { isError: true, content: [{ type: 'text', text: 'Error al eliminar la tabla: ' + (e.message || e) }] };
        }
      }
    );
Behavior5/5

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

With no annotations provided, the description carries full burden and excels. It discloses critical behavioral traits: the action is 'DESTRUCTIVA y PERMANENTE que no se puede deshacer' (destructive and permanent), requires exact user confirmation phrase matching, and has strict verification rules. This goes beyond basic function to explain safety and procedural constraints.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded with a warning. Each sentence earns its place: warning, confirmation rule, verification rule, and scope clarification. It uses bullet-like formatting for clarity without redundancy, making it efficient for an agent to parse.

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

Completeness5/5

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

Given no annotations, 100% schema coverage, no output schema, and a single parameter, the description is complete. It covers purpose, destructive nature, procedural requirements, and scope limitations. For a destructive tool, this provides sufficient context for safe invocation without needing output details.

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

Parameters4/5

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

Schema description coverage is 100% for the single parameter 'nombreTabla', so baseline is 3. The description adds value by embedding the parameter in the confirmation phrase context: 'Confirmar eliminación de la tabla [nombreTabla]', reinforcing its role. However, it doesn't add semantic details beyond what the schema provides (e.g., format constraints).

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

Purpose5/5

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

The description explicitly states the tool's purpose: 'eliminar una tabla' (delete a table). It distinguishes from siblings by specifying it deletes entire tables, not individual records or columns, unlike tools like eliminarColumna or eliminarClaveForanea. The verb+resource combination is clear and specific.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance: 'esta herramienta solo elimina tablas completas, NUNCA registros o columnas individuales.' It also implicitly contrasts with siblings like eliminarColumna or eliminarClaveForanea by specifying scope. The confirmation requirement adds procedural context for usage.

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/Yonsn76/MyPos-MCP'

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