Skip to content

normalizeToolId

function normalizeToolId(id, prefix?): string;

Defined in: core/src/tool-args.ts:118

Normalizes tool call IDs:

  1. Synthesizes a fallback if empty/whitespace.
  2. Clamps oversized IDs (> 64 chars) to avoid ChatGPT Responses 400 errors.
Parameter Type Default value
id string | null | undefined undefined
prefix string "call_pk_"

string