Type Parameters
- T extends Record<string, unknown>
Parameters
- params: T
- mapping: readonly { from: keyof T; to: string }[]
Returns Record<string, string | number | boolean>
A new Record<string, string | number | boolean> containing only the
entries that were present in params.
Builds an API parameter object by mapping tool-parameter keys to API parameter keys, including only entries whose source value is a primitive
string,number, orboolean.Falsy-but-valid primitive values (
'',0,false) are preserved so that callers can explicitly send them to the downstream API. All other value types (includingundefined,null, objects, arrays, functions, symbols, etc.) are skipped and not forwarded.