Skip to main content
Glama

delete_agent

Remove an agent from the Lightning Wallet MCP server, returning its remaining balance to the operator. Requires operator authorization and confirmation.

Instructions

Permanently delete an agent. Remaining balance is returned to operator. REQUIRES OPERATOR KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesAgent ID to delete
confirmYesMust be true to confirm deletion

Implementation Reference

  • The deleteAgent method performs the actual API call to the backend for 'delete_agent'.
     * Delete an agent permanently
     */
    async deleteAgent(agentId: number): Promise<{
      message: string;
      balanceReturned: number;
      rawResponse: ApiResponse;
    }> {
      const result = await this.request<ApiResponse & {
        message?: string;
        balance_returned?: number;
      }>('delete_agent', { agent_id: agentId });
    
      return {
        message: result.message || 'Agent deleted',
        balanceReturned: result.balance_returned || 0,
        rawResponse: result,
      };
    }
  • The Zod schema definition for input validation of the 'delete_agent' tool.
    const DeleteAgentSchema = z.object({
      agent_id: z.number().int().positive().describe('Agent ID to permanently delete'),
      confirm: z.boolean().describe('Must be true to confirm deletion'),
    });
  • src/index.ts:742-752 (registration)
    Tool registration for 'delete_agent' in the MCP server's tool list.
      name: 'delete_agent',
      description: 'Permanently delete an agent. Remaining balance is returned to operator. REQUIRES OPERATOR KEY.',
      inputSchema: {
        type: 'object',
        properties: {
          agent_id: { type: 'integer', description: 'Agent ID to delete' },
          confirm: { type: 'boolean', description: 'Must be true to confirm deletion' },
        },
        required: ['agent_id', 'confirm'],
      },
    },
  • The MCP request handler logic for 'delete_agent', including validation and calling the client method.
    case 'delete_agent': {
      const parsed = DeleteAgentSchema.parse(args);
      if (!parsed.confirm) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                success: false,
                error: 'Must set confirm: true to delete agent',
              }, null, 2),
            },
          ],
          isError: true,
        };
      }
      const result = await session.requireClient().deleteAgent(parsed.agent_id);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              message: result.message || 'Agent deleted',
              balance_returned: result.balanceReturned,
            }, null, 2),
          },
        ],
      };
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates critical traits: the action is permanent ('permanently delete'), has financial implications ('remaining balance is returned to operator'), and requires specific authorization ('REQUIRES OPERATOR KEY'). It lacks details on rate limits or error conditions, but covers essential destructive behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded, with three short sentences that each add critical information: the action, financial impact, and authorization requirement. There is no wasted text, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (destructive operation with financial implications), no annotations, and no output schema, the description does a good job covering key aspects: purpose, authorization, and side effects. It could be more complete by mentioning potential errors or the format of the response, but it provides sufficient context for safe use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already fully documents the parameters (agent_id, confirm). The description does not add any additional meaning or context beyond what the schema provides, such as explaining the consequences of deletion or the confirmation process. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('permanently delete') and resource ('an agent'), making the purpose specific and unambiguous. It distinguishes this tool from sibling tools like 'deactivate_agent' and 'reactivate_agent' by emphasizing permanent deletion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('REQUIRES OPERATOR KEY'), indicating a prerequisite. However, it does not explicitly state when not to use it or name alternatives (e.g., 'deactivate_agent' for temporary actions), which prevents a perfect score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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