Skip to main content
Glama
Ivan-Madera

midd-nestjs-hexagonal-architecture-mcp

by Ivan-Madera

inspect_project

Inspects a NestJS target project to detect domain folder/case conventions, TypeORM connection setup, reusable infrastructure, and existing modules, returning refactor rules before generation.

Instructions

Descubrimiento del proyecto destino (para el Flujo 2 refactor): detecta la convención de carpetas/case de dominios, la forma de la conexión TypeORM (forRoot por defecto vs conexiones nombradas, replication), la infraestructura transversal ya existente (JSON:API response, tipo de error, middleware, ConfigurationVariables) que debe REUSARSE, y los módulos presentes. Devuelve reglas a respetar antes de generar nada. Sobre el proyecto solo LEE; lo unico que puede escribir es la instalacion automatica del kit de agentes del MCP (.kiro/agents, agentic/templates y la seccion de AGENTS.md) la primera vez que se usa una herramienta en un repo, que es lo que el usuario pidio al configurar el MCP y se desactiva con MIDD_NESTJS_AUTO_KIT=off. Si lo instala, avisa que agente seleccionar.

Input Schema

NameRequiredDescriptionDefault
projectRootYesRuta absoluta de la raíz del servicio NestJS destino donde se escriben los archivos.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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 well: it discloses that the project is only READ, and that the sole write is a one-time agent-kit installation (.kiro/agents, agentic/templates, AGENTS.md), disabled via MIDD_NESTJS_AUTO_KIT=off, with a user-facing notice about which agent to select. This is unusually complete side-effect disclosure; only return-format/pagination-like details are absent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body is a single sprawling run-on sentence that crams detection targets, reuse rules, and the agent-kit write exception into one block. It is informative but would benefit from splitting the discovery scope from the side-effect disclosure.

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 complex discovery tool with a fully documented single param and no output schema, the description explains what it returns (rules to respect) and covers the one surprising behavior (kit install on first use). An agent has enough to call it correctly, though the return shape is only loosely sketched.

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?

There is a single parameter (projectRoot) with 100% schema description coverage, so the schema already documents it fully. The description adds no syntax or constraint detail beyond what the schema provides, making the baseline 3 appropriate.

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?

The description names a specific verb+resource (project discovery of the target NestJS repo) and enumerates concrete artifacts it detects: folder/case conventions, TypeORM connection shape, transversal infrastructure, present modules. It also distinguishes itself from the generation siblings by framing itself as producing rules to respect 'antes de generar nada'.

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?

It scopes usage to 'Flujo 2 refactor' and states the output is rules to apply before generating anything, implying it runs ahead of scaffold_service/generate_from_spec. It does not explicitly name those alternatives or state when-not-to-use, so it falls short of a 5.

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