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