Function: profileResponse()
ts
function profileResponse(
toolName,
actionKey,
blocks,
overheadBlocks?,
config?): TokenAnalysis;Defined in: packages/core/src/introspection/TokenEconomics.ts:210
Profile a complete tool response for token economics.
Analyzes all content blocks in a tool response to compute total token usage, overhead ratio, and risk classification.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
toolName | string | undefined | Name of the tool that produced the response |
actionKey | string | null | undefined | Action key (if applicable) |
blocks | readonly { text?: string; type: string; }[] | undefined | Content blocks from the tool response |
overheadBlocks | number | 0 | Number of blocks that are overhead (rules, UI) |
config | TokenEconomicsConfig | {} | Token economics configuration |
Returns
Complete token analysis