---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/litert_lm/helpers/variables/defaultRenderLiteRtToolResult.md
description: 'Default [`renderLiteRtToolResult`](https://adk.nht.io/api/@nhtio/adk/batteries/llm/litert_lm/helpers/functions/renderLiteRtToolResult).'
---

# Variable: defaultRenderLiteRtToolResult

```ts
const defaultRenderLiteRtToolResult: (input: {
  renderArtifactHandleBody?: (input: {
    artifact: unknown;
    byteLength: number;
    callId: string;
    encoding?: string;
    estimatedTokens?: number;
    lineCount: number;
  }) => string;
  renderTrustedContent: (content: string, attrs: TrustedContentAttrs) => string;
  renderUntrustedContent: (
    content: string,
    attrs: UntrustedContentAttrs,
  ) => string;
  results: Tokenizable | SpooledArtifact | Media | Media[] | SpooledArtifact[];
  tool: Tool<SpooledArtifact> | ArtifactTool | undefined;
  toolCall: ToolCall;
  unsupportedMediaPolicy: UnsupportedMediaPolicy;
  warn?: (msg: string) => void;
}) => Promise<MessageContentItem> = renderLiteRtToolResult;
```

Defined in: [src/batteries/llm/litert\_lm/helpers.ts:410](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/litert_lm/helpers.ts#L410)

Default [renderLiteRtToolResult](../functions/renderLiteRtToolResult.md).

Render a [@nhtio/adk!ToolCall](../../../../../forge/classes/ToolCall.md)'s `results` into a LiteRT `tool_response` content item.

## Parameters

| Parameter                         | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input`                           | { `renderArtifactHandleBody?`: (`input`: { `artifact`: `unknown`; `byteLength`: `number`; `callId`: `string`; `encoding?`: `string`; `estimatedTokens?`: `number`; `lineCount`: `number`; }) => `string`; `renderTrustedContent`: (`content`: `string`, `attrs`: [`TrustedContentAttrs`](../../../../interfaces/TrustedContentAttrs.md)) => `string`; `renderUntrustedContent`: (`content`: `string`, `attrs`: [`UntrustedContentAttrs`](../../../../interfaces/UntrustedContentAttrs.md)) => `string`; `results`: | [`Tokenizable`](../../../../../common/classes/Tokenizable.md) | [`SpooledArtifact`](../../../../../spooled_artifact/classes/SpooledArtifact.md) | [`Media`](../../../../../common/classes/Media.md) | [`Media`](../../../../../common/classes/Media.md)\[] | [`SpooledArtifact`](../../../../../spooled_artifact/classes/SpooledArtifact.md)\[]; `tool`: | [`Tool`](../../../../../forge/classes/Tool.md)<[`SpooledArtifact`](../../../../../spooled_artifact/classes/SpooledArtifact.md)> | [`ArtifactTool`](../../../../../forge/classes/ArtifactTool.md) | `undefined`; `toolCall`: [`ToolCall`](../../../../../forge/classes/ToolCall.md); `unsupportedMediaPolicy`: [`UnsupportedMediaPolicy`](../../../transformers_js/type-aliases/UnsupportedMediaPolicy.md); `warn?`: (`msg`: `string`) => `void`; } | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `input.renderArtifactHandleBody?` | (`input`: { `artifact`: `unknown`; `byteLength`: `number`; `callId`: `string`; `encoding?`: `string`; `estimatedTokens?`: `number`; `lineCount`: `number`; }) => `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Override for the artifact-handle body renderer (see [renderArtifactHandleBody](../../../transformers_js/helpers/functions/renderArtifactHandleBody.md)). Defaults to the shared [defaultRenderArtifactHandleBody](../../../transformers_js/helpers/variables/defaultRenderArtifactHandleBody.md). The adapter threads the consumer's `helpers.renderArtifactHandleBody` here so an app can change which forged `artifact_*` reader the model is steered toward first. |
| `input.renderTrustedContent`      | (`content`: `string`, `attrs`: [`TrustedContentAttrs`](../../../../interfaces/TrustedContentAttrs.md)) => `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `input.renderUntrustedContent`    | (`content`: `string`, `attrs`: [`UntrustedContentAttrs`](../../../../interfaces/UntrustedContentAttrs.md)) => `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `input.results`                   | | [`Tokenizable`](../../../../../common/classes/Tokenizable.md) | [`SpooledArtifact`](../../../../../spooled_artifact/classes/SpooledArtifact.md) | [`Media`](../../../../../common/classes/Media.md) | [`Media`](../../../../../common/classes/Media.md)\[] | [`SpooledArtifact`](../../../../../spooled_artifact/classes/SpooledArtifact.md)\[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `input.tool`                      | | [`Tool`](../../../../../forge/classes/Tool.md)<[`SpooledArtifact`](../../../../../spooled_artifact/classes/SpooledArtifact.md)> | [`ArtifactTool`](../../../../../forge/classes/ArtifactTool.md) | `undefined`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `input.toolCall`                  | [`ToolCall`](../../../../../forge/classes/ToolCall.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `input.unsupportedMediaPolicy`    | [`UnsupportedMediaPolicy`](../../../transformers_js/type-aliases/UnsupportedMediaPolicy.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `input.warn?`                     | (`msg`: `string`) => `void`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

## Returns

`Promise`<`MessageContentItem`>

## Remarks

A [@nhtio/adk!SpooledArtifact](../../../../../spooled_artifact/classes/SpooledArtifact.md) result renders as a HANDLE (metadata + the forged `artifact_*`
tools to read it) when its `ToolCall.inline === false` — the secure default — and inline via
`asString()` only when a producer opted into `inline: true`. Applies the trust envelope (reusing the
shared `renderTrustedContent`/`renderUntrustedContent`). Media results degrade to text via
[renderMediaToLiteRtContent](../functions/renderMediaToLiteRtContent.md)'s fallback path (LiteRT tool responses are text-shaped).
