aegis_health
Monitor Aegis server health by checking credential and agent counts to ensure secure credential isolation for AI agents.
Instructions
Check the health status of Aegis, including credential and agent counts.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/mcp-server.ts:274-314 (handler)The implementation of the `aegis_health` MCP tool handler, which gathers and returns system status including credential and agent statistics.
private registerHealthTool(): void { this.server.registerTool( 'aegis_health', { title: 'Aegis Health Check', description: 'Check the health status of Aegis, including credential and agent counts.', inputSchema: {}, }, async () => { const credentials = this.vault.list(); const stats = this.ledger.stats(); const agents = this.agentRegistry?.list() ?? []; const health = { status: 'ok', version: VERSION, credentials: { total: credentials.length, expired: credentials.filter((c) => c.expiresAt && new Date(c.expiresAt) < new Date()) .length, active: credentials.filter((c) => !c.expiresAt || new Date(c.expiresAt) >= new Date()) .length, }, agents: { total: agents.length, }, audit: stats, authenticatedAgent: this.authenticatedAgent ? { name: this.authenticatedAgent.name, tokenPrefix: this.authenticatedAgent.tokenPrefix, } : null, }; return { content: [{ type: 'text' as const, text: JSON.stringify(health, null, 2) }], }; }, ); } - src/mcp/mcp-server.ts:143-147 (registration)Where the `aegis_health` tool is registered within the `registerTools` method.
private registerTools(): void { this.registerProxyRequestTool(); this.registerListServicesTool(); this.registerHealthTool(); }