Skip to main content
Glama
amittell

firewalla-mcp-server

delete_target_list

Remove specific target lists by ID from Firewalla MCP server to streamline network security management and maintain accurate rule configurations.

Instructions

Delete a target list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTarget list ID to delete (required)

Implementation Reference

  • The DeleteTargetListHandler class implements the core execution logic for the 'delete_target_list' tool. It validates the required 'id' parameter using ParameterValidator, calls firewalla.deleteTargetList(id) within a timeout wrapper, and handles errors appropriately.
    export class DeleteTargetListHandler extends BaseToolHandler { name = 'delete_target_list'; description = 'Delete a target list from Firewalla'; category = 'rule' as const; constructor() { super({ enableGeoEnrichment: false, enableFieldNormalization: true, additionalMeta: { data_source: 'target_lists', entity_type: 'target_list_deletion', supports_geographic_enrichment: false, supports_field_normalization: true, standardization_version: '2.0.0', }, }); } async execute( args: ToolArgs, firewalla: FirewallaClient ): Promise<ToolResponse> { try { const idValidation = ParameterValidator.validateRequiredString( args?.id, 'id' ); if (!idValidation.isValid) { return createErrorResponse( this.name, 'Parameter validation failed', ErrorType.VALIDATION_ERROR, undefined, idValidation.errors ); } const id = idValidation.sanitizedValue as string; const response = await withToolTimeout( async () => firewalla.deleteTargetList(id), this.name ); return this.createUnifiedResponse(response); } catch (error: unknown) { if (error instanceof TimeoutError) { return createTimeoutErrorResponse(this.name, error.duration, 10000); } const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred'; return createErrorResponse( this.name, `Failed to delete target list: ${errorMessage}`, ErrorType.API_ERROR, { id: args?.id } ); } } }
  • Explicit JSON schema definition for the delete_target_list tool input, specifying a single required 'id' string parameter. This schema is used by the MCP server for tool validation.
    name: 'delete_target_list', description: 'Delete a target list', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Target list ID to delete (required)', }, }, required: ['id'], }, },
  • Registers the DeleteTargetListHandler instance in the central ToolRegistry during automatic handler registration.
    this.register(new DeleteTargetListHandler());
  • Imports the DeleteTargetListHandler from the rules handlers module for use in tool registration.
    GetNetworkRulesHandler, PauseRuleHandler, ResumeRuleHandler, GetTargetListsHandler, GetSpecificTargetListHandler, CreateTargetListHandler, UpdateTargetListHandler, DeleteTargetListHandler, GetNetworkRulesSummaryHandler, } from './handlers/rules.js';

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/amittell/firewalla-mcp-server'

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