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 };
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Update' implies a mutation operation, but the description doesn't mention required permissions, whether changes are reversible, potential side effects, or what happens to unspecified configuration fields. This leaves significant behavioral gaps for a tool that modifies site settings.

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 extremely concise at just three words with zero wasted language. It's front-loaded with the essential action and resource. While it may be too brief for completeness, as a standalone statement it achieves maximum efficiency.

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?

For a mutation tool with 7 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what 'configuration' encompasses, what happens during updates, or what the tool returns. The agent must rely entirely on the input schema for understanding, leaving behavioral and output aspects unspecified.

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%, providing good documentation for all 7 parameters. The description adds no parameter-specific information beyond the general 'configuration' reference. Given the comprehensive schema coverage, the baseline score of 3 is appropriate as the description doesn't need to compensate for schema gaps.

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

Purpose3/5

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

The description 'Update site configuration' clearly states the action (update) and resource (site configuration), which is better than a tautology. However, it lacks specificity about what aspects of configuration are updated and doesn't distinguish this tool from potential siblings like 'create_site' or 'get_site' beyond the verb difference.

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. With siblings like 'create_site', 'delete_site', and 'get_site' available, there's no indication of prerequisites, appropriate contexts, or distinctions between these operations. The agent must infer usage from the verb alone.

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

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