r.queryHandler(...)
Overview
Section titled “Overview”r.queryHandler(...) — registers a read handler: name, Zod input schema,
handler closure, plus optional access and rateLimit rules. Read-side
counterpart of r.writeHandler with the same header/body split. Opaque
(no handlerName) for the same single-reference case as WriteHandlerPattern.
description and agent mirror WriteHandlerPattern: description is the
prose the AI agent shows as this query’s tool description (absent →
invisible to the agent), agent.expose overrides that, and agent.risk
defaults to “low” for a query handler (reads carry less blast radius than
writes).
From packages/framework/src/engine/feature-ast/patterns.ts -> QueryHandlerPattern