Class LlmToolDsl

Assembly: redb.Route.Llm.Abstractions.dll

Apache-Camel-style DSL aspect that registers the current route as an
in the global .
Place .AsLlmTool(name) immediately after .From(uri) — it is route-level
metadata, not a step in the pipeline. Close the metadata block with .End()
or .Then() to return to the parent .

route.From("direct:order-lookup")
.AsLlmTool("get_order")
.Description("Returns order details by id.")
.Input("""{"type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}""")
.SideEffect(ToolSideEffect.ReadOnly)
.Cost(ToolCostClass.Cheap)
.Then()
.Bean<IOrderService>((svc, ex) => svc.HandleAsync(ex));

public static class LlmToolDsl

Inheritance

Object→LlmToolDsl

Methods

AsLlmTool(IRouteDefinition, string)

Marks the current route's source endpoint as an LLM tool. Returns a metadata

public static LlmToolBuilderDefinition AsLlmTool(this IRouteDefinition route, string name)