MCPcopy Index your code
hub / github.com/codeaashu/claude-code / truncateString

Function truncateString

src/utils/mcpValidation.ts:87–92  ·  view source on GitHub ↗
(content: string, maxChars: number)

Source from the content-addressed store, hash-verified

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

Callers 1

truncateMcpContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected