> ## Documentation Index
> Fetch the complete documentation index at: https://fastmcp-ts.docs.prefect.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SamplingHandler

```ts theme={null}
type SamplingHandler = (params) => 
  | AnySamplingResult
  | Promise<AnySamplingResult>;
```

Defined in: [client/handlers.ts:18](https://github.com/PrefectHQ/fastmcp-ts/blob/e4b6038f642b529f601463a576229747afebe9a4/src/client/handlers.ts#L18)

## Parameters

### params

`CreateMessageRequestParams`

## Returns

\| [`AnySamplingResult`](/api/client/type-aliases/AnySamplingResult)
\| `Promise`\<[`AnySamplingResult`](/api/client/type-aliases/AnySamplingResult)>
