deactivate_agent
Disable an agent's ability to make payments in the Lightning Wallet MCP server until manually reactivated. Requires operator authorization.
Instructions
Deactivate an agent - it cannot make payments until reactivated. REQUIRES OPERATOR KEY.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | Agent ID to deactivate |
Implementation Reference
- src/lightning-faucet.ts:748-762 (handler)The implementation of the deactivateAgent method, which makes an API request to 'update_agent' to set 'is_active' to false.
async deactivateAgent(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: false }, }); return { agentId, message: result.message || 'Agent deactivated', rawResponse: result, }; - src/index.ts:1272-1287 (handler)The tool handler for 'deactivate_agent' in the MCP server, which parses input and calls the client's deactivateAgent method.
case 'deactivate_agent': { const parsed = DeactivateAgentSchema.parse(args); const result = await session.requireClient().deactivateAgent(parsed.agent_id); return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: result.message || 'Agent deactivated', agent_id: result.agentId, }, null, 2), }, ], }; } - src/index.ts:188-190 (schema)The input validation schema for the 'deactivate_agent' tool.
const DeactivateAgentSchema = z.object({ agent_id: z.number().int().positive().describe('Agent ID to deactivate'), });