Skip to main content
Glama
purpleax

Fastly NGWAF MCP Server

by purpleax

list_site_rules

Retrieve and display security rules for a specific website in Fastly's Next-Gen WAF, including request, signal, and rate limit configurations.

Instructions

List rules for a specific site

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
corpNameNoCorporation name (uses context default if not provided)
siteNameNoSite name (uses context default if not provided)
typeNoRule type
pageNoPage number
limitNoResults per page

Implementation Reference

  • MCP tool handler for 'list_site_rules': resolves corporation and site context, validates siteName, and delegates to FastlyNGWAFClient.listSiteRules method with provided parameters.
    case 'list_site_rules':
        const { corpName: corpForSiteRules, siteName: siteForRules } = resolveContext(typedArgs);
        if (!siteForRules) {
            throw new Error('Site name is required. Please set context or provide siteName parameter.');
        }
        result = await client.listSiteRules(corpForSiteRules, siteForRules, typedArgs.type, typedArgs.page, typedArgs.limit);
        break;
  • FastlyNGWAFClient helper method implementing the core logic: constructs query parameters and makes GET request to Fastly NGWAF API endpoint for listing site rules.
    async listSiteRules(corpName, siteName, type, page, limit) {
        const params = new URLSearchParams();
        if (type)
            params.append('type', type);
        if (page)
            params.append('page', page.toString());
        if (limit)
            params.append('limit', limit.toString());
        const response = await this.api.get(`/corps/${corpName}/sites/${siteName}/rules?${params.toString()}`);
        return response.data;
    }
  • Input schema for 'list_site_rules' tool defining parameters: corpName, siteName, type (enum), page, and limit.
    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)' },
            type: { type: 'string', enum: ['request', 'signal', 'rateLimit'], description: 'Rule type' },
            page: { type: 'number', description: 'Page number' },
            limit: { type: 'number', description: 'Results per page' },
        },
    },
  • server.js:548-561 (registration)
    Tool registration object in the 'tools' array, including name, description, and inputSchema, advertised via ListToolsRequestSchema handler.
    {
        name: 'list_site_rules',
        description: 'List rules for a specific site',
        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)' },
                type: { type: 'string', enum: ['request', 'signal', 'rateLimit'], description: 'Rule type' },
                page: { type: 'number', description: 'Page number' },
                limit: { type: 'number', description: 'Results per page' },
            },
        },
    },
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 lists rules but does not cover critical behaviors like pagination handling (implied by 'page' and 'limit' parameters), authentication requirements, rate limits, or output format. This leaves significant gaps for an agent to understand operational traits.

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, clear sentence with no wasted words, making it front-loaded and easy to parse. It efficiently conveys the core action without redundancy or unnecessary detail, earning full marks for conciseness.

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?

Given the tool's complexity (5 parameters, no output schema, no annotations), the description is insufficient. It lacks details on output format, error handling, or behavioral context like pagination. Without annotations or an output schema, the description should provide more completeness to guide effective tool use, but it falls short.

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 the schema fully documents all 5 parameters. The description adds no additional meaning beyond the schema, such as explaining parameter interactions or default behaviors. With high schema coverage, the baseline score of 3 is appropriate, as the description does not compensate but also does not detract.

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 'List rules for a specific site' clearly states the verb ('list') and resource ('rules for a specific site'), making the purpose understandable. However, it lacks specificity about what 'rules' entail (e.g., security, configuration) and does not differentiate from sibling tools like 'list_corp_rules' or 'list_events', leaving ambiguity in scope.

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. It does not mention sibling tools like 'list_corp_rules' for corporation-level rules or 'get_site' for site details, nor does it specify prerequisites such as needing site context. The description implies usage for listing rules but offers no contextual boundaries.

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