get_specific_target_list
Retrieve a specific target list by ID to streamline network security monitoring and rule management within the Firewalla MSP firewall integration.
Instructions
Retrieve a specific target list by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Target list ID (required) |
Implementation Reference
- src/tools/handlers/rules.ts:1449-1511 (handler)The GetSpecificTargetListHandler class that defines the tool name, description, and implements the execute method. It validates the required 'id' parameter and calls the Firewalla API method firewalla.getSpecificTargetList(id) to retrieve the specific target list.export class GetSpecificTargetListHandler extends BaseToolHandler { name = 'get_specific_target_list'; description = 'Retrieve a specific target list by ID from Firewalla'; category = 'rule' as const; constructor() { super({ enableGeoEnrichment: false, enableFieldNormalization: true, additionalMeta: { data_source: 'target_lists', entity_type: 'target_list', 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.getSpecificTargetList(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 get target list: ${errorMessage}`, ErrorType.API_ERROR, { id: args?.id } ); } } }
- src/server.ts:309-322 (schema)MCP protocol input schema definition for the get_specific_target_list tool, specifying that it requires a string 'id' parameter.{ name: 'get_specific_target_list', description: 'Retrieve a specific target list by ID', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Target list ID (required)', }, }, required: ['id'], }, },
- src/tools/registry.ts:145-154 (registration)Registration of the GetSpecificTargetListHandler instance in the ToolRegistry's registerHandlers method during construction.// Rule tools (8 handlers) this.register(new GetNetworkRulesHandler()); this.register(new PauseRuleHandler()); this.register(new ResumeRuleHandler()); this.register(new GetTargetListsHandler()); this.register(new GetSpecificTargetListHandler()); this.register(new CreateTargetListHandler()); this.register(new UpdateTargetListHandler()); this.register(new DeleteTargetListHandler());
- src/tools/registry.ts:47-56 (registration)Import statement for GetSpecificTargetListHandler from the rules handlers module.GetNetworkRulesHandler, PauseRuleHandler, ResumeRuleHandler, GetTargetListsHandler, GetSpecificTargetListHandler, CreateTargetListHandler, UpdateTargetListHandler, DeleteTargetListHandler, GetNetworkRulesSummaryHandler, } from './handlers/rules.js';