Spaces:
Paused
Paused
fix: add registeredTools count to health endpoint
Browse filesFrontend expects health.registeredTools to display MCP Tools count.
Added mcpRegistry.getRegisteredTools().length to health response.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
apps/backend/src/index.ts
CHANGED
|
@@ -136,12 +136,13 @@ async function startServer() {
|
|
| 136 |
|
| 137 |
// Health check endpoint - FAST response
|
| 138 |
app.get('/health', async (req, res) => {
|
| 139 |
-
// Basic process health
|
| 140 |
res.json({
|
| 141 |
status: 'healthy', // Always return healthy if process is up
|
| 142 |
timestamp: new Date().toISOString(),
|
| 143 |
uptime: process.uptime(),
|
| 144 |
-
environment: process.env.NODE_ENV
|
|
|
|
| 145 |
});
|
| 146 |
});
|
| 147 |
|
|
|
|
| 136 |
|
| 137 |
// Health check endpoint - FAST response
|
| 138 |
app.get('/health', async (req, res) => {
|
| 139 |
+
// Basic process health - registeredTools count fetched dynamically
|
| 140 |
res.json({
|
| 141 |
status: 'healthy', // Always return healthy if process is up
|
| 142 |
timestamp: new Date().toISOString(),
|
| 143 |
uptime: process.uptime(),
|
| 144 |
+
environment: process.env.NODE_ENV,
|
| 145 |
+
registeredTools: mcpRegistry.getRegisteredTools().length
|
| 146 |
});
|
| 147 |
});
|
| 148 |
|