{"record":{"id":"39f7c6209a839173","repo":"different-ai/openwork","slug":"reduce-or-repair-the-provider-mcp-catalog-or-resou","errorCode":null,"errorMessage":"Reduce or repair the provider MCP catalog or resource to satisfy the named enterprise client limit.","messagePattern":"Reduce or repair the provider MCP catalog or resource to satisfy the named enterprise client limit\\.","errorType":"error_code","errorClass":"ExternalMcpDiagnosticError","httpStatus":null,"severity":"error","filePath":"ee/apps/den-api/src/capability-sources/enterprise-mcp-client-adapter.ts","lineNumber":248,"sourceCode":"        },\n      } : {}),\n    }),\n  }\n}\n\nasync function runEnterpriseMcpOperation<T>(input: {\n  connection: ExternalMcpConnectionRow\n  diagnosticReferenceId?: string\n  lifecycleDeadline?: ExternalMcpLifecycleDeadline\n  operationTimeoutMs?: number\n  toolCallInspector?: ExternalMcpToolCallInspector\n  operation: (client: EnterpriseMcpClient) => Promise<T>\n}): Promise<T> {\n  const { client, tracker } = createOperationClient(input)\n  try {\n    return await input.operation(client)\n  } catch (error) {\n    throw translateEnterpriseMcpError(error, tracker)\n  }\n}\n\nexport async function connectExternalMcp(\n  connection: ExternalMcpConnectionRow,\n  redirectUri: string,\n  signedState?: string,\n  member?: ExternalMcpMemberContext,\n  diagnosticReferenceId?: string,\n): Promise<ExternalMcpConnectResult> {\n  return runEnterpriseMcpOperation({\n    connection,\n    diagnosticReferenceId,\n    operation: (client) => client.connect({\n      connection: toEnterpriseConnection(connection, member),\n      redirectUri,\n      authorizationId: signedState,\n    }),","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-api/src/capability-sources/enterprise-mcp-client-adapter.ts#L230-L266","documentation":"`runEnterpriseMcpOperation` wraps every external MCP client operation in the Den gateway; any error thrown by the wrapped operation is funneled through `translateEnterpriseMcpError`, which converts low-level MCP/transport faults into operator-facing messages. This message means the provider's MCP catalog or resource violates a named enterprise client limit (e.g. catalog size, tool count, schema constraints) and the connection or tool operation was refused.","triggerScenarios":"Any of connectExternalMcp, completeExternalMcpAuth, abandonExternalMcpAuth, listExternalMcpTools, runExternalMcpToolCall, or callExternalMcpToolRaw invokes an operation whose client returns an error that translates to an enterprise client limit violation; the tracker annotates which phase (connect/auth/discovery/call) failed.","commonSituations":"Connecting a third-party MCP server whose tool catalog exceeds enterprise limits; a provider updated its server adding tools/resources that breach limits; OAuth completion succeeding but catalog validation failing during initial discovery.","solutions":["Read the named limit in the translated error and reduce the provider's catalog/resource accordingly (remove tools, shrink schemas)","Use a scoped MCP server that exposes only the needed tools instead of the full catalog","If you administer the provider, split the server into multiple smaller MCP endpoints and connect the relevant one","Check the diagnostic tracker output for the exact phase and limit to target the fix"],"exampleFix":"// before\nawait connectExternalMcp(conn, redirectUri) // provider exposes 500 tools -> limit violation\n// after\n// point the connection at a scoped server exposing only required tools\nconst scopedConn = { ...conn, url: \"https://mcp.example.com/scoped\" };\nawait connectExternalMcp(scopedConn, redirectUri);","handlingStrategy":"try-catch","validationCode":"// before connecting, verify the provider catalog fits limits\nconst tools = await probeProviderTools(conn.url);\nif (tools.length > ENTERPRISE_MCP_ITEM_LIMIT) throw new Error(\"catalog too large; use scoped server\");","typeGuard":"function isEnterpriseMcpLimitError(e: unknown): boolean {\n  return e instanceof Error && /enterprise client limit/i.test(e.message);\n}","tryCatchPattern":"try {\n  await connectExternalMcp(conn, redirectUri);\n} catch (e) {\n  if (isEnterpriseMcpLimitError(e)) {\n    logDiagnostic(tracker.phase, e.message); // tells you which limit and phase\n  } else throw e;\n}","preventionTips":["Pre-validate provider catalogs against enterprise limits before connecting","Prefer scoped MCP servers over monolithic aggregators","Re-validate after provider updates that add tools/resources","Read the named limit in the error message and act on that specific constraint"],"tags":["mcp","enterprise","catalog","limits"],"backgroundTag":"mcp-catalog-limit-exceeded","analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}