Differentiate MCP servers from generic 'item' (flat 15) — they actually
cost 500+ tokens per turn for protocol metadata and tool schemas.
estimateTokens(bytes, 'mcp', {toolCount}) returns max of:
- 500 token floor (base overhead)
- ceil(bytes / 3.5) (json-rate when bytes known)
- 500 + toolCount * 200 (when tool count is detected; Step 14 wires this)
Caller-side migration in next commit (Step 5).
Tests: +4 cases for mcp kind.
|
||
|---|---|---|
| .. | ||
| active-config-reader.test.mjs | ||
| baseline.test.mjs | ||
| diff-engine.test.mjs | ||
| file-discovery.test.mjs | ||
| output.test.mjs | ||
| report-generator.test.mjs | ||
| scoring.test.mjs | ||
| severity.test.mjs | ||
| string-utils.test.mjs | ||
| suppression.test.mjs | ||
| yaml-parser.test.mjs | ||