Skip to main content
Glama

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}`); } }

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