---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/media/type-aliases/MediaStepMiddlewareFn.md
description: >-
  Consumer step interceptor — the `use` seam. Same onion shape as the tool
  batteries.
---

# Type Alias: MediaStepMiddlewareFn

```ts
type MediaStepMiddlewareFn = (
  ctx: StepContext,
  next: NextFn,
) => void | Promise<void>;
```

Defined in: [src/batteries/media/runtime.ts:80](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/runtime.ts#L80)

Consumer step interceptor — the `use` seam. Same onion shape as the tool batteries.

## Parameters

| Parameter | Type                                          |
| --------- | --------------------------------------------- |
| `ctx`     | [`StepContext`](../interfaces/StepContext.md) |
| `next`    | `NextFn`                                      |

## Returns

`void` | `Promise`<`void`>
