MCP Apps
    Preparing search index...

    Type Alias AppToolCallback<In, Out>

    AppToolCallback: In extends StandardSchemaV1
        ? (
            args: StandardSchemaV1.InferOutput<In>,
            extra: RequestHandlerExtra,
        ) => AppToolResult<Out> | Promise<AppToolResult<Out>>
        : (
            extra: RequestHandlerExtra,
        ) => AppToolResult<Out> | Promise<AppToolResult<Out>>

    Callback for an app-registered tool. When In is provided, args is the validated/parsed input; when In is undefined, the callback receives only extra. When Out is provided, the return's structuredContent is typed.

    Mirrors ToolCallback from @modelcontextprotocol/sdk/server/mcp.js but is parameterized over StandardSchemaV1 instead of zod, so any Standard-Schema-compatible library (Zod, ArkType, Valibot, …) can be used.

    Type Parameters