Module utils

Module utils 

Source
Expand description

Utility functions for creating handlers from closures

This module provides convenience functions for creating handler implementations from simple closures. These are primarily used by the #[server] macro but can also be used directly for quick handler creation.

Structs§

FunctionPromptHandler
Function-based prompt handler
FunctionResourceHandler
Function-based resource handler

Functions§

prompt
Create a prompt handler from a closure
resource
Create a resource handler from a closure
tool
Create a tool handler from a closure
tool_with_schema
Create a tool handler with a custom schema