Skip to main content
Glama
mcp-hr-sql-readonly

mcp-hr-sql-readonly

by Marcovo93

Query SQL in sola lettura

query
Read-only

Run a single read-only SELECT against a Zucchetti HR environment and return columns and rows as JSON for safe data inspection; non-SELECT and multi-statement requests are rejected.

Instructions

Esegue UNA SELECT su un ambiente Zucchetti e restituisce colonne e righe in JSON. Rifiuta tutto ciò che non è una SELECT singola: scritture, DDL, EXEC, SELECT INTO, più statement, commenti. Su un ambiente dati diverso da 001 i nomi delle tabelle vanno scritti con il suo codice (es. hrdd_002employee00). Filtrare sempre per IDCOMPANY e limitare le righe (TOP su SQL Server, LIMIT su PostgreSQL). Non inventare nomi di tabella o colonna: se non li conosci, cercali prima in INFORMATION_SCHEMA.TABLES e INFORMATION_SCHEMA.COLUMNS. I codici (IDCOMPANY, IDEMPLOY...) sono testo: tra apici, con tutti gli zeri (es. IDCOMPANY = '000123').

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesQuery SQL: una sola SELECT
ambienteNoNome dell'ambiente (vuoto = default del registro)
max_righeNoRighe restituite al massimo (default 500)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description reinforces rather than contradicts them by enumerating exactly what is refused (writes, DDL, EXEC, SELECT INTO, multi-statement, comments). It adds genuinely new behavior: JSON columns/rows return format, per-environment table-name qualification (hrdd_002employee00), row-limiting dialect differences (TOP vs LIMIT), and the string-quoting/zero-padding convention for codes such as IDCOMPANY = '000123'.

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?

Front-loaded with the core action, then ordered rules — rejection list, environment naming, filtering/limiting, discovery-first, quoting convention. Every sentence is a constraint an agent must obey; nothing is padding.

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?

There is no output schema, but the description states the return shape (columns and rows as JSON). For a raw-SQL tool with three simple parameters, the failure modes an agent would hit — wrong environment prefix, unquoted IDs, unbounded scans, invented table names — are all covered.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: 'ambiente' determines the table-name prefix convention, and 'max_righe' relates to the mandated row-limiting advice with dialect-specific implementations. The quoting/zero-padding rule for identifier values in 'sql' is guidance the schema text ('una sola SELECT') does not convey.

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 ('Esegue UNA SELECT su un ambiente Zucchetti') plus the return shape (colonne e righe in JSON), which is unambiguous. It does not, however, explicitly distinguish itself from the metadata siblings (cerca_tabelle, descrivi_tabella) — instead it points to INFORMATION_SCHEMA, so the agent must infer the division of labor.

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 clear when-to-use boundaries: only a single SELECT; writes, DDL, EXEC, SELECT INTO, multiple statements and comments are rejected. It also prescribes mandatory practice (always filter by IDCOMPANY, always limit rows) and tells the agent not to invent table/column names. It stops short of naming the sibling tools that would be the natural alternative for schema discovery.

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