Skip to main content
Glama

fb_query

Execute SELECT queries on Firebird databases with a safe 1–1000 row limit, rejecting data-altering commands and committing immediately to keep reads safe.

Instructions

Executa consulta SELECT de leitura no Firebird com limite seguro de linhas (1 a 1000). Seguro: Rejeita comandos de alteração de dados e encerra a transação com commit imediato. Se houver múltiplos bancos no projeto e nenhum estiver ativo na sessão, pergunte antes ao usuário.

Input Schema

NameRequiredDescriptionDefault
sqlYes
limitNo
db_aliasNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: enforced row limit of 1-1000, rejection of data-alteration statements, and immediate commit that ends the transaction. It omits error surface, connection/permission requirements, and what happens to the row limit vs. the `limit` parameter when they conflict.

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?

Three short sentences, front-loaded with the operation and its safety bound, then the transaction semantics, then the one conditional instruction. No filler or repetition.

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

Completeness4/5

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

No output schema and no annotations, so the description must cover behavior end to end; it handles safety, limit bounds, transaction outcome, and the ambiguous-database case. Missing details are the shape of returned rows and behavior when the query hits the row cap.

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 description coverage is 0% on 3 parameters, so the description should compensate more than it does. It does add real meaning for `limit` (the 1-1000 safe bound vs. the schema's bare default of 50) and hints at `db_alias` through the multi-database advice, but it never describes the `sql` argument's accepted form or the alias resolution rules.

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?

States a specific verb and resource ('Executa consulta SELECT de leitura no Firebird') plus the enforced scope (read-only, safe row limit). This cleanly separates it from the mutating siblings fb_execute_dml and fb_execute_ddl without opening any schema.

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

Usage Guidelines4/5

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

Gives a concrete routing condition: if multiple databases exist and none is active in the session, ask the user. It also implies read-only usage by stating alteration commands are rejected, but it never explicitly names fb_execute_dml/fb_execute_ddl as the alternatives for writes.

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