Documentation
    Preparing search index...

    Function Params

    • 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.

      Type Parameters

      • T

      Parameters

      • Optionalvalidator: IRequestBodyValidator<T>

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

      Returns ParameterDecorator

      Parameter decorator.

      wildduck - https://github.com/wildduck2