Skip to main content
Glama
purpleax

Fastly NGWAF MCP Server

by purpleax

manage_alerts

Monitor and manage attack pattern alerts on Fastly NGWAF by listing, creating, updating, or deleting alerts based on custom tags, intervals, and thresholds.

Instructions

Manage alerts for monitoring attack patterns

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform
action_typeNoAction when triggered
alertIdNoAlert ID (for update/delete actions)
corpNameNoCorporation name (uses context default if not provided)
enabledNoWhether alert is enabled
intervalNoTime interval in minutes
longNameNoAlert description
siteNameNoSite name (uses context default if not provided)
tagNameNoTag name to monitor
thresholdNoThreshold count

Implementation Reference

  • Executes the manage_alerts tool by resolving context, validating siteName, and dispatching to appropriate client methods (listAlerts, createAlert, updateAlert, deleteAlert) based on the action parameter.
    case 'manage_alerts': const { corpName: corpForAlerts, siteName: siteForAlerts } = resolveContext(typedArgs); if (!siteForAlerts) { throw new Error('Site name is required. Please set context or provide siteName parameter.'); } if (typedArgs.action === 'list') { result = await client.listAlerts(corpForAlerts, siteForAlerts); } else if (typedArgs.action === 'create') { const alertData = { tagName: typedArgs.tagName, longName: typedArgs.longName, interval: typedArgs.interval, threshold: typedArgs.threshold, enabled: typedArgs.enabled, action: typedArgs.action_type, }; result = await client.createAlert(corpForAlerts, siteForAlerts, alertData); } else if (typedArgs.action === 'update') { const alertData = { tagName: typedArgs.tagName, longName: typedArgs.longName, interval: typedArgs.interval, threshold: typedArgs.threshold, enabled: typedArgs.enabled, action: typedArgs.action_type, }; result = await client.updateAlert(corpForAlerts, siteForAlerts, typedArgs.alertId, alertData); } else if (typedArgs.action === 'delete') { result = await client.deleteAlert(corpForAlerts, siteForAlerts, typedArgs.alertId); } break;
  • Defines the tool name, description, and input schema for parameters like action, alertId, tagName, threshold, etc.
    name: 'manage_alerts', description: 'Manage alerts for monitoring attack patterns', inputSchema: { type: 'object', properties: { corpName: { type: 'string', description: 'Corporation name (uses context default if not provided)' }, siteName: { type: 'string', description: 'Site name (uses context default if not provided)' }, action: { type: 'string', enum: ['list', 'create', 'update', 'delete'], description: 'Action to perform' }, alertId: { type: 'string', description: 'Alert ID (for update/delete actions)' }, tagName: { type: 'string', description: 'Tag name to monitor' }, longName: { type: 'string', description: 'Alert description' }, interval: { type: 'number', enum: [1, 10, 60], description: 'Time interval in minutes' }, threshold: { type: 'number', description: 'Threshold count' }, enabled: { type: 'boolean', description: 'Whether alert is enabled' }, action_type: { type: 'string', enum: ['info', 'flagged'], description: 'Action when triggered' }, }, required: ['action'], }, },
  • FastlyNGWAFClient class methods that handle API calls for listing, creating, updating, and deleting alerts, used by the tool handler.
    // Alerts Management async listAlerts(corpName, siteName) { const response = await this.api.get(`/corps/${corpName}/sites/${siteName}/alerts`); return response.data; } async createAlert(corpName, siteName, alertData) { const response = await this.api.post(`/corps/${corpName}/sites/${siteName}/alerts`, alertData); return response.data; } async updateAlert(corpName, siteName, alertId, alertData) { const response = await this.api.patch(`/corps/${corpName}/sites/${siteName}/alerts/${alertId}`, alertData); return response.data; } async deleteAlert(corpName, siteName, alertId) { await this.api.delete(`/corps/${corpName}/sites/${siteName}/alerts/${alertId}`); return { success: true }; }

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/purpleax/FastlyMCP'

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