Skip to main content
Glama
purpleax

Fastly NGWAF MCP Server

by purpleax

update_site

Modify security settings for a Fastly NGWAF protected website to adjust agent action levels, block parameters, and display configurations.

Instructions

Update site configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
corpNameNoCorporation name (uses context default if not provided)
siteNameNoSite name (uses context default if not provided)
displayNameNoDisplay name
agentLevelNoAgent action level
blockDurationSecondsNoBlock duration in seconds
blockHTTPCodeNoHTTP response code for blocked requests
blockRedirectURLNoRedirect URL for blocked requests

Implementation Reference

  • MCP tool handler logic for 'update_site' within the CallToolRequestSchema request handler. Resolves corporation and site names using context or parameters, validates siteName, constructs the update payload from input arguments, and invokes the underlying client.updateSite method to perform the API update.
    case 'update_site': const { corpName: corpForUpdate, siteName: siteForUpdate } = resolveContext(typedArgs); if (!siteForUpdate) { throw new Error('Site name is required. Please set context or provide siteName parameter.'); } const updateData = { displayName: typedArgs.displayName, agentLevel: typedArgs.agentLevel, blockDurationSeconds: typedArgs.blockDurationSeconds, blockHTTPCode: typedArgs.blockHTTPCode, blockRedirectURL: typedArgs.blockRedirectURL, }; result = await client.updateSite(corpForUpdate, siteForUpdate, updateData); break;
  • Supporting method in FastlyNGWAFClient class that implements the core API interaction for updating a site. Sends a PATCH request to the Fastly NGWAF API endpoint `/corps/{corpName}/sites/{siteName}` with the provided siteData.
    async updateSite(corpName, siteName, siteData) { const response = await this.api.patch(`/corps/${corpName}/sites/${siteName}`, siteData); return response.data; }
  • JSON schema definition for the 'update_site' tool, specifying input parameters for corporation/site names and site configuration fields like displayName, agentLevel, etc. Used for tool discovery and validation in MCP ListTools response.
    { name: 'update_site', description: 'Update site configuration', 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)' }, displayName: { type: 'string', description: 'Display name' }, agentLevel: { type: 'string', enum: ['block', 'log', 'off'], description: 'Agent action level' }, blockDurationSeconds: { type: 'number', description: 'Block duration in seconds' }, blockHTTPCode: { type: 'number', description: 'HTTP response code for blocked requests' }, blockRedirectURL: { type: 'string', description: 'Redirect URL for blocked requests' }, }, }, },
  • server.js:814-816 (registration)
    Registration of the ListToolsRequestSchema handler in the MCP server, which returns the full tools array including 'update_site', thereby registering all tools for discovery.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/purpleax/FastlyMCP'

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