Skip to main content
Glama
purpleax

Fastly NGWAF MCP Server

by purpleax

delete_corp_rule

Remove a corporation-level security rule from Fastly's Next-Gen Web Application Firewall to manage web application protection policies.

Instructions

Delete a corporation-level rule

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
corpNameNoCorporation name (uses context default if not provided)
ruleIdYesRule ID to delete

Implementation Reference

  • Handler logic in the CallToolRequestSchema that processes the delete_corp_rule tool call, resolves the corpName using context, and invokes the client helper.
    case 'delete_corp_rule':
        const { corpName: corpForDeleteRule } = resolveContext(typedArgs);
        result = await client.deleteCorpRule(corpForDeleteRule, typedArgs.ruleId);
        break;
  • Input schema definition for the delete_corp_rule tool, specifying parameters corpName (optional) and required ruleId.
    inputSchema: {
        type: 'object',
        properties: {
            corpName: { type: 'string', description: 'Corporation name (uses context default if not provided)' },
            ruleId: { type: 'string', description: 'Rule ID to delete' },
        },
        required: ['ruleId'],
    },
  • server.js:604-615 (registration)
    Tool registration in the tools array returned by ListToolsRequestSchema, defining name, description, and schema for delete_corp_rule.
    {
        name: 'delete_corp_rule',
        description: 'Delete a corporation-level rule',
        inputSchema: {
            type: 'object',
            properties: {
                corpName: { type: 'string', description: 'Corporation name (uses context default if not provided)' },
                ruleId: { type: 'string', description: 'Rule ID to delete' },
            },
            required: ['ruleId'],
        },
    },
  • FastlyNGWAFClient helper method that performs the actual DELETE API request to remove a corporation rule.
    async deleteCorpRule(corpName, ruleId) {
        await this.api.delete(`/corps/${corpName}/rules/${ruleId}`);
        return { success: true };
  • Utility function resolveContext used by the handler to determine corpName and siteName from arguments or default 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?

No annotations are provided, so the description carries full burden. It states the tool deletes a rule, implying a destructive mutation, but doesn't disclose behavioral traits such as permissions required, whether deletion is permanent or reversible, error handling, or side effects. This is a significant gap for a destructive tool.

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 zero waste, front-loading the core purpose. It's appropriately sized for a simple tool, though brevity contributes to gaps in other dimensions.

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 destructive nature, lack of annotations, and no output schema, the description is incomplete. It doesn't address critical context like what 'delete' entails, success/error responses, or dependencies, leaving the agent with insufficient information for safe and effective use.

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%, with parameters 'corpName' and 'ruleId' documented in the schema. The description adds no additional meaning beyond the schema, such as explaining the relationship between parameters or deletion constraints. Baseline 3 is appropriate as the schema handles parameter documentation.

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

Purpose4/5

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

The description clearly states the action ('Delete') and target ('a corporation-level rule'), providing specific verb+resource. However, it doesn't differentiate from sibling tools like 'delete_site_rule' or 'delete_site', which target different resources at potentially different scopes.

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 lacks context about prerequisites (e.g., needing rule existence), exclusions, or comparisons to siblings like 'delete_site_rule' or 'list_corp_rules' for verification.

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