reactivate_agent
Reactivate a deactivated agent in the Lightning Wallet MCP server to restore its ability to manage Bitcoin Lightning payments and access paid APIs using the operator key.
Instructions
Reactivate a previously deactivated agent. REQUIRES OPERATOR KEY.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | Agent ID to reactivate |
Implementation Reference
- src/lightning-faucet.ts:766-783 (handler)The actual implementation of the reactivateAgent method in the LightningFaucetClient class.
* Reactivate an agent */ async reactivateAgent(agentId: number): Promise<{ agentId: number; message: string; rawResponse: ApiResponse; }> { const result = await this.request<ApiResponse & { message?: string }>('update_agent', { agent_id: agentId, updates: { is_active: true }, }); return { agentId, message: result.message || 'Agent reactivated', rawResponse: result, }; } - src/index.ts:1289-1304 (handler)The MCP tool handler for the 'reactivate_agent' tool, which calls the client method.
case 'reactivate_agent': { const parsed = ReactivateAgentSchema.parse(args); const result = await session.requireClient().reactivateAgent(parsed.agent_id); return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: result.message || 'Agent reactivated', agent_id: result.agentId, }, null, 2), }, ], }; } - src/index.ts:192-194 (schema)Input validation schema for the 'reactivate_agent' tool.
const ReactivateAgentSchema = z.object({ agent_id: z.number().int().positive().describe('Agent ID to reactivate'), }); - src/index.ts:571-580 (registration)Registration of the 'reactivate_agent' tool within the MCP server definition.
name: 'reactivate_agent', description: 'Reactivate a previously deactivated agent. REQUIRES OPERATOR KEY.', inputSchema: { type: 'object', properties: { agent_id: { type: 'integer', description: 'Agent ID to reactivate' }, }, required: ['agent_id'], }, },