Documentation
    Preparing search index...
    • Parameter decorator for an MCP tool's input arguments.

      @McpRoute.Params<T>() validates the arguments object from a tools/call request against the TypeScript type T using typia. A failed validation surfaces to the client as a JSON-RPC -32602 (InvalidParams) error with structured diagnostics, giving the LLM precise feedback to self-correct.

      MCP tools accept exactly one arguments object; applying this decorator more than once on a single method is a compile-time error. The decorated type T must be an object type without dynamic properties (no Record<string, X>, no index signatures); the nestia transformer enforces this through LlmSchemaProgrammer.validate.

      Type Parameters

      • T

      Parameters

      • Optionalvalidator: IRequestBodyValidator<T>

        Optional custom validator. Default is typia.assert().

      Returns ParameterDecorator

      Parameter decorator.