Skip to main content
Glama
vespo92

OPNSense MCP Server

apply_blocklist_category

Block domains within predefined categories like adult, malware, ads, or social using OPNsense firewall management for enhanced network security and control.

Instructions

Apply a predefined category of domain blocks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesCategory of domains to block

Implementation Reference

  • The main handler function for the 'apply_blocklist_category' tool. It takes a category parameter and applies the corresponding predefined blocklist by blocking multiple domains using blockMultipleDomains method, delegating to specific block methods for adult and malware.
    async applyBlocklistCategory(category: 'adult' | 'malware' | 'ads' | 'social'): Promise<{ blocked: string[], failed: string[] }> {
      switch (category) {
        case 'adult':
          return this.blockAdultContent();
        
        case 'malware':
          return this.blockMalware();
        
        case 'ads': {
          const adDomains = [
            'doubleclick.net',
            'googleadservices.com',
            'googlesyndication.com',
            'adnxs.com',
            'facebook.com/tr',
            'amazon-adsystem.com'
          ];
          return this.blockMultipleDomains(adDomains, 'Ad Block');
        }
        
        case 'social': {
          const socialDomains = [
            'facebook.com',
            'www.facebook.com',
            'instagram.com',
            'www.instagram.com',
            'twitter.com',
            'www.twitter.com',
            'tiktok.com',
            'www.tiktok.com'
          ];
          return this.blockMultipleDomains(socialDomains, 'Social Media Block');
        }
        
        default:
          throw new Error(`Unknown category: ${category}`);
      }
    }
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. 'Apply' suggests a write/mutation operation, but it doesn't disclose critical behavioral traits: whether this requires admin permissions, if it's reversible (e.g., via 'unblock_domain'), what happens to existing blocks in the category, or if it triggers system restarts. For a mutation tool with zero annotation coverage, this is insufficient.

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 wasted words. It's front-loaded with the core action and resource, making it easy to parse. Every word earns its place without redundancy or fluff.

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 no annotations and no output schema, the description is incomplete. It lacks information on permissions, side effects, reversibility, and what 'apply' entails operationally (e.g., immediate enforcement, logging). Given the complexity of domain blocking and sibling tools, more context is needed 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 the single parameter 'category' fully documented in the schema (including enum values). The description adds no additional parameter semantics beyond implying it's for 'predefined' categories, which the schema's enum already suggests. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('apply') and resource ('predefined category of domain blocks'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'block_domain' or 'toggle_blocklist_entry', which likely handle individual domain blocks rather than categories.

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 'block_domain', 'toggle_blocklist_entry', and 'list_dns_blocklist', there's no indication whether this tool is for bulk operations, preset configurations, or differs in permanence. The agent must infer usage from the name 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

Related 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/vespo92/OPNSenseMCP'

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