MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / truncateString

Function truncateString

source code/utils/mcpValidation.ts:89–94  ·  view source on GitHub ↗
(content: string, maxChars: number)

Source from the content-addressed store, hash-verified

87}
88
89function truncateString(content: string, maxChars: number): string {
90 if (content.length <= maxChars) {
91 return content
92 }
93 return content.slice(0, maxChars)
94}
95
96async function truncateContentBlocks(
97 blocks: ContentBlockParam[],

Callers 1

truncateMcpContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected