---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/context/thrift/contracts/type-aliases/RenderToolsFn.md
description: >-
  Renders a set of tools into the EXACT prompt text a caller's LLM battery will
  send to the model (e.g. a `<tool_definitions>` block with full JSON-Schema per
  tool), so the tools bucket is measured against the REAL dispatched size rather
  than a cheap `name: description` proxy. Injecting this is the difference
  between an accurate budget and one that silently undercounts by an order of
  magnitude for schema-heavy tools — see the calibration note on {@link
  @nhtio/adk/batteries/context/thrift/subtractive_pass!subtractToFit}. Optional:
  when omitted, the pass falls back to the `name: description` proxy (keeps the
  battery usable standalone/in tests without a real tool-rendering pipeline).
---

# Type Alias: RenderToolsFn

```ts
type RenderToolsFn = (tools: ReadonlyArray<WorkingTool>) => string;
```

Defined in: [src/batteries/context/thrift/contracts.ts:257](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/context/thrift/contracts.ts#L257)

Renders a set of tools into the EXACT prompt text a caller's LLM battery will send to the model
(e.g. a `<tool_definitions>` block with full JSON-Schema per tool), so the tools bucket is measured
against the REAL dispatched size rather than a cheap `name: description` proxy. Injecting this is
the difference between an accurate budget and one that silently undercounts by an order of
magnitude for schema-heavy tools — see the calibration note on
[@nhtio/adk/batteries/context/thrift/subtractive\_pass!subtractToFit](../../subtractive_pass/functions/subtractToFit.md). Optional: when omitted,
the pass falls back to the `name: description` proxy (keeps the battery usable standalone/in tests
without a real tool-rendering pipeline).

## Parameters

| Parameter | Type                                                             | Description                                                             |
| --------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `tools`   | `ReadonlyArray`<[`WorkingTool`](../interfaces/WorkingTool.md)> | The subset of tools currently visible (post-hiding), to render/measure. |

## Returns

`string`

The exact rendered text the caller's battery would send for these tools.
