Skip to main content
Glama
amittell

firewalla-mcp-server

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
NameRequiredDescriptionDefault
idYesTarget list ID (required)

Implementation Reference

  • 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 } ); } } }
  • 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'], }, },
  • 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());
  • Import statement for GetSpecificTargetListHandler from the rules handlers module.
    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