Skip to main content
Glama
purpleax

Fastly NGWAF MCP Server

by purpleax

manage_lists

Create, update, delete, or view custom security lists (IP, country, string) for Fastly's Next-Gen WAF to control web application access and protection.

Instructions

Manage custom lists (IP, country, string, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
corpNameNoCorporation name (uses context default if not provided)
siteNameNoSite name (optional for corp-level lists, uses context default if not provided)
actionYesAction to perform
listIdNoList ID (for update/delete actions)
nameNoList name (for create action)
typeNoList type
descriptionNoList description
entriesNoList entries
additionsNoEntries to add (for update)
deletionsNoEntries to remove (for update)

Implementation Reference

  • The main execution handler for the 'manage_lists' tool within the CallToolRequestSchema handler. It resolves context, then based on the 'action' parameter (list, create, update, delete), calls the appropriate FastlyNGWAFClient methods for corporation or site-level lists.
    case 'manage_lists':
        const { corpName: corpForLists, siteName: siteForLists } = resolveContext(typedArgs);
        if (typedArgs.action === 'list') {
            result = siteForLists
                ? await client.listSiteLists(corpForLists, siteForLists)
                : await client.listCorpLists(corpForLists);
        }
        else if (typedArgs.action === 'create') {
            const listData = {
                name: typedArgs.name,
                type: typedArgs.type,
                description: typedArgs.description,
                entries: typedArgs.entries,
            };
            result = siteForLists
                ? await client.createSiteList(corpForLists, siteForLists, listData)
                : await client.createCorpList(corpForLists, listData);
        }
        else if (typedArgs.action === 'update') {
            const updateData = {
                description: typedArgs.description,
                entries: {
                    additions: typedArgs.additions,
                    deletions: typedArgs.deletions,
                },
            };
            result = siteForLists
                ? await client.updateSiteList(corpForLists, siteForLists, typedArgs.listId, updateData)
                : await client.updateCorpList(corpForLists, typedArgs.listId, updateData);
        }
        else if (typedArgs.action === 'delete') {
            result = siteForLists
                ? await client.deleteSiteList(corpForLists, siteForLists, typedArgs.listId)
                : await client.deleteCorpList(corpForLists, typedArgs.listId);
        }
        break;
  • The tool definition including name, description, and inputSchema for 'manage_lists', which defines the parameters and validation for tool calls.
    {
        name: 'manage_lists',
        description: 'Manage custom lists (IP, country, string, etc.)',
        inputSchema: {
            type: 'object',
            properties: {
                corpName: { type: 'string', description: 'Corporation name (uses context default if not provided)' },
                siteName: { type: 'string', description: 'Site name (optional for corp-level lists, uses context default if not provided)' },
                action: { type: 'string', enum: ['list', 'create', 'update', 'delete'], description: 'Action to perform' },
                listId: { type: 'string', description: 'List ID (for update/delete actions)' },
                name: { type: 'string', description: 'List name (for create action)' },
                type: { type: 'string', enum: ['ip', 'country', 'string', 'wildcard', 'signal'], description: 'List type' },
                description: { type: 'string', description: 'List description' },
                entries: { type: 'array', items: { type: 'string' }, description: 'List entries' },
                additions: { type: 'array', items: { type: 'string' }, description: 'Entries to add (for update)' },
                deletions: { type: 'array', items: { type: 'string' }, description: 'Entries to remove (for update)' },
            },
            required: ['action'],
        },
    },
  • server.js:814-816 (registration)
    The ListToolsRequestSchema handler that returns the static 'tools' array containing the 'manage_lists' tool registration.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
        return { tools };
    });
  • FastlyNGWAFClient class methods for list management operations (list, create, update, delete for both corp and site levels), which are called by the tool handler.
    // Lists Management
    async listCorpLists(corpName) {
        const response = await this.api.get(`/corps/${corpName}/lists`);
        return response.data;
    }
    async listSiteLists(corpName, siteName) {
        const response = await this.api.get(`/corps/${corpName}/sites/${siteName}/lists`);
        return response.data;
    }
    async createCorpList(corpName, listData) {
        const response = await this.api.post(`/corps/${corpName}/lists`, listData);
        return response.data;
    }
    async createSiteList(corpName, siteName, listData) {
        const response = await this.api.post(`/corps/${corpName}/sites/${siteName}/lists`, listData);
        return response.data;
    }
    async updateCorpList(corpName, listId, updateData) {
        const response = await this.api.patch(`/corps/${corpName}/lists/${listId}`, updateData);
        return response.data;
    }
    async updateSiteList(corpName, siteName, listId, updateData) {
        const response = await this.api.patch(`/corps/${corpName}/sites/${siteName}/lists/${listId}`, updateData);
        return response.data;
    }
    async deleteCorpList(corpName, listId) {
        await this.api.delete(`/corps/${corpName}/lists/${listId}`);
        return { success: true };
    }
    async deleteSiteList(corpName, siteName, listId) {
        await this.api.delete(`/corps/${corpName}/sites/${siteName}/lists/${listId}`);
        return { success: true };
  • Helper function used by the handler to resolve corporation and site names from tool arguments or global context.
    function resolveContext(args) {
        const corpName = args.corpName || context.defaultCorpName;
        const siteName = args.siteName || context.defaultSiteName;
        if (!corpName) {
            throw new Error('Corporation name is required. Please set context or provide corpName parameter.');
        }
        return { corpName, siteName };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies CRUD operations via 'manage' but doesn't disclose permissions, side effects, rate limits, or response format. For a tool with 10 parameters and multiple actions, this is inadequate.

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 no wasted words. It's appropriately sized for a tool name that implies broad functionality, though this conciseness comes at the cost of detail.

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 complex tool with 10 parameters, multiple actions, no annotations, and no output schema, the description is insufficient. It doesn't explain the tool's role in the system, how it differs from similar sibling tools, or what to expect upon invocation, leaving significant gaps for the agent.

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?

Schema description coverage is 100%, so parameters are well-documented in the schema. The description adds marginal value by hinting at list types ('IP, country, string, etc.') which aligns with the 'type' enum, but doesn't explain parameter interactions or usage beyond what the schema provides.

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 'Manage custom lists (IP, country, string, etc.)' states a general purpose but lacks specificity. It mentions the resource ('custom lists') and examples of list types, but doesn't specify the verb beyond 'manage' or differentiate from sibling tools like 'manage_blacklist' or 'manage_whitelist' that might handle similar list types.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context, or compare to sibling tools like 'manage_blacklist' or 'manage_whitelist', leaving the agent to infer usage based on the action parameter 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