Skip to main content
Glama

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
NameRequiredDescriptionDefault
agent_idYesAgent ID to deactivate

Implementation Reference

  • 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,
      };
  • 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),
          },
        ],
      };
    }
  • The input validation schema for the 'deactivate_agent' tool.
    const DeactivateAgentSchema = z.object({
      agent_id: z.number().int().positive().describe('Agent ID to deactivate'),
    });

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