Skip to main content
Glama
lzaafe-alt

lolosqltools

by lzaafe-alt

generate_template

Generates BSG-compliant SQL templates for a chosen object type, adding mandatory fields, documentation headers, and constraint naming to standardize database objects.

Instructions

Generates a complete, BSG-compliant SQL template for a given object type. Includes all mandatory fields, documentation headers, and constraint naming.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesBase name WITHOUT prefix (e.g., 'Alumno' → T_Alumno, SP_TAlumno_Insertar)
actionNoFor SP: the DML action
authorYesAuthor name for documentation header
fieldsNoFor TABLE: field definitions (audit fields are auto-appended)
schemaYesSQL schema name (e.g., 'com', 'mkt', 'rrhh')
returnsNoFor SP/FUNCTION: what the object returns
parametersNoFor SP/FUNCTION: parameter definitions
table_nameNoFor TRIGGER: the table name the trigger belongs to
descriptionYesDescription for documentation header
object_typeYesType of SQL object to generate
trigger_actionNoFor TRIGGER: which DML actions fire the trigger

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the artifact's contents (mandatory fields, documentation headers, constraint naming), but says nothing about whether the generator only returns text or persists anything, whether output is deterministic/idempotent, or what the returned structure looks like.

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?

Two tight sentences with zero filler; the core purpose leads and the artifact inventory follows. Nothing is repeated and every clause carries information.

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

Completeness3/5

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

An 11-parameter generator with no output schema and no annotations leaves the description under-burdened: it never explains the return format (text? file path?), nor how output varies by object_type, nor that this is a non-mutating code-generation step.

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 100%, so every parameter is already documented in the schema, including the conditional fields for SP/FUNCTION/TRIGGER. The description adds no extra parameter meaning beyond the baseline, and notably does not clarify how object_type drives which conditional params are required.

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 (Generates) and a concrete resource (a BSG-compliant SQL template for a given object type), and enumerates what the artifact contains. It does not differentiate itself from siblings like get_rules or validate_sql_object, which a user generating a template would plausibly confuse it with.

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 versus fetching rules (get_rules) or validating a finished object (validate_sql_object). The description assumes a user already knows they want a generated template and offers no conditions, prerequisites, or alternatives.

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