mcp-server-0.1.0.8: Library for building Model Context Protocol (MCP) servers
Safe HaskellNone
LanguageGHC2024

MCP.Server.Derive

Synopsis

Template Haskell Derivation

derivePromptHandler :: Name -> Name -> Q Exp Source #

Derive prompt handlers from a data type Usage: $(derivePromptHandler ''MyPrompt 'handlePrompt)

derivePromptHandlerWithDescription :: Name -> Name -> [(String, String)] -> Q Exp Source #

Derive prompt handlers from a data type with custom descriptions Usage: $(derivePromptHandlerWithDescription ''MyPrompt 'handlePrompt [(Constructor, Description)])

deriveResourceHandler :: Name -> Name -> Q Exp Source #

Derive resource handlers from a data type Usage: $(deriveResourceHandler ''MyResource 'handleResource)

deriveResourceHandlerWithDescription :: Name -> Name -> [(String, String)] -> Q Exp Source #

Derive resource handlers from a data type with custom descriptions Usage: $(deriveResourceHandlerWithDescription ''MyResource 'handleResource [(Constructor, Description)])

deriveToolHandler :: Name -> Name -> Q Exp Source #

Derive tool handlers from a data type Usage: $(deriveToolHandler ''MyTool 'handleTool)

deriveToolHandlerWithDescription :: Name -> Name -> [(String, String)] -> Q Exp Source #

Derive tool handlers from a data type with custom descriptions Usage: $(deriveToolHandlerWithDescription ''MyTool 'handleTool [(Constructor, Description)])