Skip to content

Documentation / @agentick/gateway / MethodDefinitionInput

Interface: MethodDefinitionInput<TSchema> ​

Defined in: gateway/src/types.ts:339

Method definition input (what you pass to method())

Extended by ​

Type Parameters ​

TSchema ​

TSchema extends ZodLikeSchema = ZodLikeSchema

Properties ​

description? ​

optional description: string

Defined in: gateway/src/types.ts:353

Method description for discovery


guard()? ​

optional guard: (ctx) => boolean | Promise<boolean>

Defined in: gateway/src/types.ts:351

Custom guard function

Parameters ​

ctx ​

KernelContext

Returns ​

boolean | Promise<boolean>


handler ​

handler: SimpleMethodHandler<ReturnType<TSchema["parse"]>, unknown> | StreamingMethodHandler<ReturnType<TSchema["parse"]>, unknown>

Defined in: gateway/src/types.ts:345

Handler function - receives validated & typed params


response? ​

optional response: ZodLikeSchema

Defined in: gateway/src/types.ts:343

Zod schema for response (used by schema discovery only)


roles? ​

optional roles: string[]

Defined in: gateway/src/types.ts:349

Required roles - checked before handler


schema? ​

optional schema: TSchema

Defined in: gateway/src/types.ts:341

Zod schema for params validation + TypeScript inference

Released under the ISC License.