MCP PHP SDK

SamplingCallbackInterface

Contract for callbacks used by SamplingRequestHandler.

since protocol revision 2026-07-28 (SEP-2577), earliest removal 2027-07-28. Integrate with an LLM provider's API directly instead.

Implementations perform the actual LLM sampling when requested by the server.

Table of Contents

Methods

__invoke()  : CreateSamplingMessageResult

Methods

On this page

Search results