Stone.js API
    Preparing search index...

    Turns the routes an application already has into the tools an agent can call.

    The whole design in one sentence: a tool is a route that said so. Nothing is registered twice, nothing is described twice, and the permission that guards the route is the permission that guards the tool, because the tool call is dispatched to that route.

    Everything else is derivation, and every source of it is optional. A route that declares a validation schema gets an input schema for free. One that carries an openapi summary gets a description for free. An application using neither still gets tools, built from what a route always has: a path, a method, and its parameters. That degradation is the point, not a fallback: this module must not require a stack to be useful.

    The registry holds no state. Deriving is a pure read of the router, and the router belongs to the container, which is rebuilt for every event: a registry that cached would be caching something whose lifetime it does not own.

    Index
    • The tool an agent named, or nothing.

      Parameters

      • name: string

        The tool's name.

      Returns Promise<McpToolRoute>

      The tool and its route.

    • Every tool this application exposes, with the route each one leads to.

      Returns Promise<McpToolRoute[]>

      The tools, in the order the router holds their routes.