Skip to main content
Glama
Ivan-Madera

midd-nestjs-hexagonal-architecture-mcp

by Ivan-Madera

record_architecture

Records each NestJS module in a repo architecture inventory and audit file, using its spec to avoid duplicates and keep compliance, build, and design decisions for future sessions.

Instructions

Registra un módulo en docs/architecture-inventory.json (envelope con mcpVersion/generatedAt; una entrada por módulo, sin tocar las de otros) y escribe docs/audits/-.md. Lee el middleware.spec.yaml del módulo para no duplicar datos; acepta compliance (salida de verify_standards), estado de build y decisiones. Es la memoria por repo del MCP: léela al abrir una sesión futura para no duplicar módulos.

Input Schema

NameRequiredDescriptionDefault
specPathYesRuta absoluta al middleware.spec.yaml del módulo a inventariar/auditar.
decisionsNoDecisiones de diseño tomadas durante la generación/refactor, para la auditoría.
complianceNoSalida de verify_standards (u observaciones) para la sección de compliance de la auditoría.
buildStatusNoResultado de build/tests para la auditoría (p.ej. "build OK, 12 tests en verde").
projectRootYesRuta absoluta de la raíz del servicio NestJS destino donde se escriben los archivos.
writeAuditFileNoSi true (default), escribe también docs/audits/<module>-<fecha>.md además del inventario.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does disclose key mutation semantics: it writes two file types, merges one entry per module 'sin tocar las de otros', and uses an envelope with mcpVersion/generatedAt. It omits what happens on re-registration of the same module (overwrite vs. append), required filesystem permissions, and error 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?

Three sentences, front-loaded with the write targets and followed by inputs and the memory rationale; little waste. The final sentence about being 'la memoria por repo del MCP' is useful routing context rather than filler.

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?

For a 6-parameter mutation tool with no output schema, it covers artifacts written, data sources read, and cross-session usage well. The remaining gap is the return value / confirmation shape, which an agent would need to verify the write succeeded.

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 all six parameters including compliance ('Salida de verify_standards') and buildStatus. The description mostly restates those fields rather than adding syntax or format guidance, and it never mentions writeAuditFile, which lets the caller opt out of the audit file it describes as always written.

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 (registra) plus the exact resources touched: docs/architecture-inventory.json and docs/audits/<module>-<fecha>.md. It also names the source artifact it consumes (middleware.spec.yaml, verify_standards output), so an agent can distinguish it from pure documentation generators like generate_api_docs or verify_standards.

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 context for use: call it after generating/refactoring a module, feeding it compliance, build status and decisions; and read the inventory at the start of a future session to avoid re-registering modules. It lacks an explicit exclusion versus the sibling record_decision, which overlaps conceptually with the 'decisions' parameter.

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