Stone.js API
    Preparing search index...
    • Declare that a handler method is a tool.

      The same shape as @Validate and @Returns, and the same purpose: a controller-first application says it on the method rather than on the route option. Both are read, and the route option wins when both are present, because with a router in play a route is the single description of itself.

      Type Parameters

      • T extends Function = Function

      Parameters

      • mcp: McpInput

        The tool's name, or its full declaration.

      Returns MethodDecorator

      A method decorator.

      class NotesController {
      @Tool({ name: 'create-note', description: 'Create a note for the signed-in user.' })
      @Post('/notes')
      create (event: IncomingHttpEvent) { … }
      }