---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/media/forge/variables/defaultResolveMedia.md
description: >-
  The default media resolver: scan `ctx.turnMessages[].attachments`, then
  `ctx.turnToolCalls[].results`, for a Media with the given id.
---

# Variable: defaultResolveMedia

```ts
const defaultResolveMedia: MediaResolverFn;
```

Defined in: [src/batteries/media/forge.ts:91](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/forge.ts#L91)

The default media resolver: scan `ctx.turnMessages[].attachments`, then
`ctx.turnToolCalls[].results`, for a Media with the given id.

## Param

**ctx**

The dispatch context.

## Param

**mediaId**

The id to find.

## Returns

The Media, or `undefined` when nothing in the turn carries that id.
