{"record":{"id":"95f179882ba419e9","repo":"different-ai/openwork","slug":"mcp-catalog-schema-size-limit","errorCode":"MCP_CATALOG_SCHEMA_SIZE_LIMIT","errorMessage":"MCP_CATALOG_SCHEMA_SIZE_LIMIT","messagePattern":"MCP_CATALOG_SCHEMA_SIZE_LIMIT","errorType":"error_code","errorClass":"EnterpriseMcpCatalogError","httpStatus":null,"severity":"error","filePath":"packages/enterprise-mcp-client/src/tool-catalog.ts","lineNumber":66,"sourceCode":"    maxDepth = Math.max(maxDepth, frame.depth)\n    if (typeof frame.value !== \"object\" || frame.value === null) continue\n    if (active.has(frame.value)) return { bytes: 0, depth: maxDepth, cyclic: true }\n    active.add(frame.value)\n    stack.push({ value: null, depth: frame.depth, leaving: frame.value })\n    const children = Array.isArray(frame.value) ? frame.value : Object.values(frame.value)\n    for (const child of children) stack.push({ value: child, depth: frame.depth + 1 })\n  }\n  return { bytes: serializedBytes(value), depth: maxDepth, cyclic: false }\n}\n\nfunction assertSchema(schema: unknown): void {\n  const measurement = measureSchema(schema)\n  if (measurement.cyclic) throw new EnterpriseMcpCatalogError(\"MCP_CATALOG_SCHEMA_CYCLE\")\n  if (measurement.depth > ENTERPRISE_MCP_TOOL_SCHEMA_DEPTH_LIMIT) {\n    throw new EnterpriseMcpCatalogError(\"MCP_CATALOG_SCHEMA_DEPTH_LIMIT\")\n  }\n  if (measurement.bytes > ENTERPRISE_MCP_TOOL_SCHEMA_LIMIT_BYTES) {\n    throw new EnterpriseMcpCatalogError(\"MCP_CATALOG_SCHEMA_SIZE_LIMIT\")\n  }\n}\n\nfunction assertTool(tool: EnterpriseMcpTool): void {\n  assertStringLimit(tool.name, ENTERPRISE_MCP_TOOL_NAME_LIMIT_BYTES, \"MCP_CATALOG_TOOL_NAME_LIMIT\")\n  assertStringLimit(tool.title, ENTERPRISE_MCP_TOOL_TITLE_LIMIT_BYTES, \"MCP_CATALOG_TOOL_TITLE_LIMIT\")\n  assertStringLimit(tool.description, ENTERPRISE_MCP_TOOL_DESCRIPTION_LIMIT_BYTES, \"MCP_CATALOG_TOOL_DESCRIPTION_LIMIT\")\n  assertSchema(tool.inputSchema)\n  if (tool.outputSchema) assertSchema(tool.outputSchema)\n}\n\nexport async function collectEnterpriseMcpTools(input: {\n  listPage: (cursor: string | undefined, options: RequestOptions) => Promise<ToolPage>\n  requestOptions: RequestOptions\n}): Promise<EnterpriseMcpTool[]> {\n  const tools: EnterpriseMcpTool[] = []\n  const names = new Set<string>()\n  const cursors = new Set<string>()","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/packages/enterprise-mcp-client/src/tool-catalog.ts#L48-L84","documentation":"Error \"MCP_CATALOG_SCHEMA_SIZE_LIMIT\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at packages/enterprise-mcp-client/src/tool-catalog.ts:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}