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

Function getMaxMcpOutputTokens

src/utils/mcpValidation.ts:26–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 * 3. Hardcoded default
25 */
26export function getMaxMcpOutputTokens(): number {
27 const envValue = process.env.MAX_MCP_OUTPUT_TOKENS
28 if (envValue) {
29 const parsed = parseInt(envValue, 10)
30 if (Number.isFinite(parsed) && parsed > 0) {
31 return parsed
32 }
33 }
34 const overrides = getFeatureValue_CACHED_MAY_BE_STALE<Record<
35 string,
36 number
37 > | null>('tengu_satin_quoll', {})
38 const override = overrides?.['mcp_tool']
39 if (
40 typeof override === 'number' &&
41 Number.isFinite(override) &&
42 override > 0
43 ) {
44 return override
45 }
46 return DEFAULT_MAX_MCP_OUTPUT_TOKENS
47}
48
49export type MCPToolResult = string | ContentBlockParam[] | undefined
50

Callers 3

getMaxMcpOutputCharsFunction · 0.85
getTruncationMessageFunction · 0.85

Tested by

no test coverage detected