Skip to main content
Glama
amittell

firewalla-mcp-server

get_specific_target_list

Retrieve a specific target list by ID to access predefined network security rules and configurations for monitoring and management.

Instructions

Retrieve a specific target list by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTarget list ID (required)

Implementation Reference

  • The handler class GetSpecificTargetListHandler implements the core logic for the 'get_specific_target_list' tool. It validates the required 'id' parameter, calls the Firewalla API via firewalla.getSpecificTargetList(id), handles timeouts and errors, and returns a unified response.
    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 }
          );
        }
      }
    }
  • Defines the input schema for the tool in the ListToolsRequestHandler, specifying that it requires a single 'id' string 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'],
      },
    },
  • Registers the GetSpecificTargetListHandler instance in the ToolRegistry during automatic tool registration.
    this.register(new GetSpecificTargetListHandler());
  • Imports the GetSpecificTargetListHandler from the rules handlers module.
      GetNetworkRulesHandler,
      PauseRuleHandler,
      ResumeRuleHandler,
      GetTargetListsHandler,
      GetSpecificTargetListHandler,
      CreateTargetListHandler,
      UpdateTargetListHandler,
      DeleteTargetListHandler,
      GetNetworkRulesSummaryHandler,
    } from './handlers/rules.js';
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action ('retrieve'), but doesn't describe what 'retrieve' entails—such as whether it returns detailed data, requires authentication, has rate limits, or handles errors. This leaves significant gaps for a tool that likely fetches sensitive or structured data.

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 a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to scan and understand quickly without unnecessary elaboration.

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

Completeness2/5

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

Given the complexity of retrieving a specific entity (likely with structured data), no annotations, and no output schema, the description is incomplete. It doesn't explain what data is returned, error conditions, or behavioral traits, leaving the agent with insufficient information for reliable 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%, with the 'id' parameter fully documented in the schema. The description adds no additional meaning beyond what the schema provides (e.g., format examples or context about ID sources), so it meets the baseline for high schema coverage without compensating value.

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

Purpose4/5

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

The description clearly states the verb ('retrieve') and resource ('specific target list by ID'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'get_target_lists' (which likely lists multiple target lists) or 'search_target_lists' (which likely searches with criteria), missing full sibling differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose it over 'get_target_lists' (for listing all) or 'search_target_lists' (for searching by criteria), and offers no context about prerequisites or exclusions.

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

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