---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/bedrock_converse/helpers/functions/sanitizeToolUseId.md
---

# Function: sanitizeToolUseId()

```ts
function sanitizeToolUseId(id: string): string;
```

Defined in: [src/batteries/llm/bedrock\_converse/helpers.ts:148](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/llm/bedrock_converse/helpers.ts#L148)

Converse rejects a `toolUseId` outside `[A-Za-z0-9_-]{1,64}`.

## Parameters

| Parameter | Type     |
| --------- | -------- |
| `id`      | `string` |

## Returns

`string`

## Remarks

ADK ids are UUIDv6, which is already in-charset, but a caller-supplied id may not be — and the
rejection names neither the field nor the offending character.
