Skip to main content
Glama
ferflorwers25

Auto Parts Inventory Agent

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
POSTGRES_PORTNoThe port the PostgreSQL container is published on (default 5433, instead of 5432, so it doesn't clash with a locally installed PostgreSQL). Change it with POSTGRES_PORT in .env.5433

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
buscar_repuestosA

Busca repuestos y devuelve precio en córdobas, stock por sucursal y modelos compatibles.

Usala para preguntas como "¿qué pastillas de freno hay para una Hilux 2019?" o
"¿hay filtro de aire para una retroexcavadora 310L?". Combiná texto (qué repuesto)
con marca_vehiculo, modelo y anio (para qué vehículo). Se ignoran tildes y mayúsculas.
stock_bajo_minimoA

Lista los repuestos cuyo stock actual está por debajo del stock mínimo.

Devuelve sucursal, código, repuesto, stock actual, stock mínimo y faltante, con los agotados (stock 0) primero. Usala para preguntas sobre qué hay que reabastecer.

resumen_movimientosA

Resume entradas y salidas de un repuesto por sucursal en un rango de fechas.

Por sucursal devuelve unidades que entraron (compras e inventario inicial), unidades que salieron (ventas y ajustes por merma), número de ventas, monto vendido en córdobas, fecha del último movimiento y stock actual. Sin fechas, resume todo el historial (1 de abril al 30 de septiembre de 2026).

consulta_sqlA

Ejecuta una consulta SELECT de solo lectura. Es el respaldo para preguntas que las otras herramientas no cubren (rankings, totales por mes, comparaciones entre sucursales, etc.).

Límites: una sola sentencia, solo lectura, máximo 500 filas y 5 segundos.

Esquema (PostgreSQL, montos en córdobas):
- categorias(id, nombre, descripcion)
- proveedores(id, nombre, pais, contacto, telefono, email)
- repuestos(id, codigo, nombre, marca, categoria_id, proveedor_id, precio_nio, costo_nio, activo)
- modelos_vehiculo(id, marca, modelo, anio_desde, anio_hasta, tipo: 'vehiculo'|'maquinaria'|'motocicleta')
- repuesto_modelo(repuesto_id, modelo_id)  -- compatibilidad muchos a muchos
- sucursales(id, nombre, ciudad, departamento, direccion, telefono)
- inventario(sucursal_id, repuesto_id, stock_actual, stock_minimo)
- movimientos(id, repuesto_id, sucursal_id, tipo: 'entrada'|'salida',
              motivo: 'inventario_inicial'|'compra'|'venta'|'ajuste',
              cantidad (siempre positiva), precio_unitario, fecha timestamptz, referencia)
  precio_unitario es el precio de venta en ventas y el costo en entradas y ajustes.
- v_stock_bajo_minimo(sucursal, codigo, repuesto, marca, categoria, stock_actual, stock_minimo, faltante)
Para ignorar tildes usá unaccent(), ej.: unaccent(nombre) ILIKE unaccent('%estelí%').
Movimientos: 2026-04-01 a 2026-09-30, zona horaria America/Managua.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 4 tools

Disambiguation4/5

The three domain tools (buscar_repuestos, stock_bajo_minimo, resumen_movimientos) target clearly distinct questions—search, reorder alerts, and movement history. The only overlap is consulta_sql, a general fallback whose SQL could technically answer what the specialized tools already cover, but it is explicitly framed as a backup for uncovered questions.

Naming Consistency3/5

All names are snake_case and readable, but the conventions are mixed: buscar_repuestos is verb_noun, while stock_bajo_minimo, resumen_movimientos, and consulta_sql are noun phrases or state descriptors. No single predictable verb_noun pattern runs throughout.

Tool Count4/5

Four tools is lean but each earns its place: two focused lookups, one reporting tool, and one flexible SQL escape hatch. It sits just below the ideal range but is well-scoped for a read-only inventory assistant.

Completeness4/5

Coverage spans part search, low-stock reporting, and movement summaries, with consulta_sql filling gaps like rankings, monthly totals, and cross-branch comparisons. Write operations (creating/updating parts) are absent, but the server appears intentionally read-only.

Maintenance

ActivityMaintained
ResponsivenessNo issues