Skip to content
1 min read · 134 words

Function: forgeMediaTools()

ts
function forgeMediaTools(
  pipeline: MediaPipeline,
  options: ForgeMediaToolsOptions,
): Record<string, Tool>;

Defined in: src/batteries/media/forge.ts:652

Forge agent tools over a configured media pipeline.

Parameters

ParameterTypeDescription
pipelineMediaPipelineA pipeline from createMediaPipeline.
optionsForgeMediaToolsOptionsSurface, resolver, gate, and overrides.

Returns

Record<string, Tool>

The minted tools, keyed by name.

Remarks

The minted set follows the pipeline's configured engines: in the composite surface the media_query grammar text only advertises available verbs; in the granular surface a tool is minted only for verbs whose engine (if any) is configured. Either way list_media is included — it is the model's entry point for discovering media_id values.

The returned record is keyed by tool name so consumers can register selectively or pass Object.values(tools) to TurnRunnerConfig.tools.