Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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) }],
          };
        },
      );
    }
  • Where the `aegis_health` tool is registered within the `registerTools` method.
    private registerTools(): void {
      this.registerProxyRequestTool();
      this.registerListServicesTool();
      this.registerHealthTool();
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/getaegis/aegis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server