Skip to main content
Glama
amittell

firewalla-mcp-server

get_specific_alarm

Retrieve detailed information about a specific Firewalla alarm using its unique ID to analyze security events and network incidents.

Instructions

Get detailed information for a specific Firewalla alarm

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alarm_idYesAlarm ID (required for API call)

Implementation Reference

  • GetSpecificAlarmHandler class: core implementation executing the tool logic. Validates alarm_id, calls firewalla.getSpecificAlarm(alarmId), applies geo-enrichment, handles errors including not found, formats unified response.
    export class GetSpecificAlarmHandler extends BaseToolHandler {
      name = 'get_specific_alarm';
      description =
        'Get detailed information for a specific alarm by alarm ID. Requires alarm_id parameter obtained from get_active_alarms or search_alarms (aid field is automatically normalized). Features improved ID resolution that automatically tries multiple ID formats to handle API inconsistencies.';
      category = 'security' as const;
    
      constructor() {
        super({
          enableGeoEnrichment: true,
          enableFieldNormalization: true,
          additionalMeta: {
            data_source: 'specific_alarm',
            entity_type: 'security_alarm_detail',
            supports_geographic_enrichment: true,
            supports_field_normalization: true,
            standardization_version: '2.0.0',
          },
        });
      }
    
      async execute(
        args: ToolArgs,
        firewalla: FirewallaClient
      ): Promise<ToolResponse> {
        try {
          const alarmIdValidation = ParameterValidator.validateAlarmId(
            args?.alarm_id,
            'alarm_id'
          );
    
          if (!alarmIdValidation.isValid) {
            return this.createErrorResponse(
              'Parameter validation failed',
              ErrorType.VALIDATION_ERROR,
              undefined,
              alarmIdValidation.errors
            );
          }
    
          const rawAlarmId = alarmIdValidation.sanitizedValue as string;
          const alarmId = validateAlarmId(rawAlarmId);
    
          const response = await withToolTimeout(
            async () => firewalla.getSpecificAlarm(alarmId),
            'get_specific_alarm'
          );
    
          // Check if alarm exists
          if (!response || !response.results || response.results.length === 0) {
            return this.createErrorResponse(
              `Alarm with ID '${alarmId}' not found. Please verify the alarm ID is correct and the alarm has not been deleted.`,
              ErrorType.API_ERROR,
              {
                alarm_id: alarmId,
                suggestion:
                  'Use get_active_alarms to list available alarms and their IDs',
              }
            );
          }
    
          const startTime = Date.now();
    
          // Apply geographic enrichment to the alarm data
          const enrichedAlarm = await this.enrichGeoIfNeeded(response, [
            'src',
            'dst',
            'device.ip',
            'remote.ip',
          ]);
    
          const unifiedResponseData = {
            alarm: enrichedAlarm,
            retrieved_at: getCurrentTimestamp(),
          };
    
          const executionTime = Date.now() - startTime;
          return this.createUnifiedResponse(unifiedResponseData, {
            executionTimeMs: executionTime,
          });
        } catch (error: unknown) {
          if (error instanceof TimeoutError) {
            return createTimeoutErrorResponse(
              'get_specific_alarm',
              error.duration,
              10000
            );
          }
    
          const errorMessage =
            error instanceof Error ? error.message : 'Unknown error occurred';
    
          // Check for specific API error patterns
          if (errorMessage.includes('404') || errorMessage.includes('not found')) {
            return this.createErrorResponse(
              `Alarm not found: ${args?.alarm_id}. The alarm may have been deleted or the ID may be incorrect.`,
              ErrorType.API_ERROR,
              {
                alarm_id: args?.alarm_id,
                suggestion:
                  'Use get_active_alarms to list available alarms and their IDs',
              }
            );
          }
    
          return this.createErrorResponse(
            `Failed to get specific alarm: ${errorMessage}`,
            ErrorType.API_ERROR
          );
        }
      }
    }
  • Tool registration: GetSpecificAlarmHandler is instantiated and registered in the ToolRegistry.
    this.register(new GetSpecificAlarmHandler());
  • MCP input schema definition for get_specific_alarm tool in ListTools response.
    {
      name: 'get_specific_alarm',
      description:
        'Get detailed information for a specific Firewalla alarm',
      inputSchema: {
        type: 'object',
        properties: {
          alarm_id: {
            type: 'string',
            description: 'Alarm ID (required for API call)',
          },
        },
        required: ['alarm_id'],
      },
    },
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 states the tool 'Get[s] detailed information,' implying a read-only operation, but doesn't clarify aspects like authentication requirements, rate limits, error handling, or what 'detailed information' includes (e.g., fields, format). This leaves significant gaps for a tool with no annotation coverage.

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 that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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

Completeness3/5

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

Given the tool's low complexity (one required parameter) and high schema coverage, the description is minimally adequate. However, with no annotations and no output schema, it fails to fully compensate by not explaining behavioral traits or return values, leaving the agent to infer details from the tool name and schema alone.

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 input schema has 100% description coverage, with the single parameter 'alarm_id' documented as 'Alarm ID (required for API call).' The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints, so it meets the baseline score of 3 for high schema coverage.

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 ('Get') and resource ('detailed information for a specific Firewalla alarm'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_active_alarms' or 'search_alarms', which would require mentioning this tool retrieves a single alarm by ID rather than listing or searching multiple alarms.

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 that it's for retrieving a single alarm by ID, as opposed to using 'get_active_alarms' for all active alarms or 'search_alarms' for filtered searches, nor does it specify prerequisites like needing the alarm ID.

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