Skip to main content
Glama

list_agents

Display all AI agents in your Lightning Wallet MCP operator account to manage spending limits and budget controls.

Instructions

List all agents under your operator account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'list_agents' which calls the client's listAgents method.
    case 'list_agents': {
      ListAgentsSchema.parse(args);
      const result = await session.requireClient().listAgents();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              agents: result.agents,
              total: result.agents.length,
            }, null, 2),
          },
        ],
      };
    }
  • The actual implementation in the LightningFaucetClient class that makes the API request to the backend.
    async listAgents(): Promise<{
      agents: Array<{
        id: number;
        name: string;
        balance_sats: number;
        is_active: boolean;
      }>;
      rawResponse: ListAgentsResponse;
    }> {
      const result = await this.request<ListAgentsResponse>('list_agents');
    
      const agents = (result.agents || []).map(agent => ({
        id: agent.id,
        name: agent.name,
        balance_sats: agent.balance_sats,
        is_active: agent.is_active,
      }));
    
      return {
        agents,
        rawResponse: result,
      };
    }
  • Input schema definition for the list_agents tool.
    const ListAgentsSchema = z.object({});
  • src/index.ts:440-447 (registration)
    Tool registration definition for 'list_agents' in the server tool list.
      name: 'list_agents',
      description: 'List all agents under your operator account.',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },

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/lightningfaucet/lightning-wallet-mcp'

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