Skip to main content
Glama

execute-query

execute-query
Destructive

Run SQL queries on Firebird databases with pagination via FIRST/ROWS and parameterized inputs to prevent SQL injection.

Instructions

Executes a SQL query in the Firebird database. Uses FIRST/ROWS for pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL query to execute (Firebird uses FIRST/ROWS for pagination instead of LIMIT)
paramsNoParameters for parameterized queries to prevent SQL injection

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoFailure information; present when success is false
resultNoThe legacy JSON payload; present for completed operations and partial batches
successYesFalse for tool failures, including partially failed batches

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.12.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / params / items / anyOf
      Removed value: -[
      -  {
      -    "anyOf": [
      -      {
      -        "type": [
      -          "string",
      -          "number"
      -        ]
      -      },
      -      {
      -        "type": "boolean"
      -      }
      -    ]
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / params / items / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "null"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "__schema0": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        },
      +        {
      +          "items": {
      +            "$ref": "#/$defs/__schema0"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "additionalProperties": {
      +            "$ref": "#/$defs/__schema0"
      +          },
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "__schema1": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        },
      +        {
      +          "items": {
      +            "$ref": "#/$defs/__schema1"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "additionalProperties": {
      +            "$ref": "#/$defs/__schema1"
      +          },
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        }
      +      ]
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "error": {
      +      "additionalProperties": false,
      +      "description": "Failure information; present when success is false",
      +      "properties": {
      +        "details": {
      +          "additionalProperties": {
      +            "$ref": "#/$defs/__schema1"
      +          },
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "type": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "message",
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    "result": {
      +      "additionalProperties": false,
      +      "description": "The legacy JSON payload; present for completed operations and partial batches",
      +      "properties": {
      +        "rows": {
      +          "items": {
      +            "additionalProperties": {
      +              "$ref": "#/$defs/__schema0"
      +            },
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "rows"
      +      ],
      +      "type": "object"
      +    },
      +    "success": {
      +      "description": "False for tool failures, including partially failed batches",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, openWorldHint=true, and idempotentHint=false, so safety is covered externally. However, the description adds no behavioral context of its own for a tool that can mutate or drop data — nothing about transactions, commit behavior, multi-statement handling, or error semantics on partial failure. The pagination sentence duplicates the schema rather than disclosing new behavior.

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?

Two short sentences with the core action front-loaded and no filler. It is efficient, though the second sentence is redundant with the schema's 'sql' description.

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?

An output schema exists, so return values need not be explained, but a destructive, non-idempotent query tool should state commit/rollback behavior and whether DDL/DML is permitted. None of that is present, leaving material gaps for an agent about to run arbitrary SQL.

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%, so the schema already documents both 'sql' and 'params', including the injection-prevention note and the FIRST/ROWS pagination detail. The description merely repeats the pagination point, adding nothing the schema does not already say; baseline 3 applies.

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?

States a specific verb and resource ('Executes a SQL query in the Firebird database'), which is clear on its own. It does not explicitly distinguish itself from the closest sibling, execute-batch-queries, so the agent must infer the single-vs-batch split.

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 when-to-use guidance, no mention of when to prefer execute-batch-queries, and no prerequisites or cautions given for a tool whose annotations mark it destructive. The agent receives no routing help.

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