Skip to main content
Glama
vespo92

OPNSense MCP Server

toggle_blocklist_entry

Enable or disable a DNS blocklist entry in OPNSense by specifying the UUID of the entry using the MCP server for efficient firewall management.

Instructions

Enable/disable a DNS blocklist entry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYesUUID of the blocklist entry

Implementation Reference

  • The core handler function that toggles the enabled/disabled state of a specific DNS blocklist entry identified by its UUID. It fetches the current entry, flips the 'enabled' flag between '0' and '1', updates it via the OPNSense API client, and applies the changes.
    async toggleBlocklistEntry(uuid: string): Promise<void> {
      try {
        const entry = await this.client.getUnboundHost(uuid);
        if (!entry?.host) {
          throw new Error('Blocklist entry not found');
        }
    
        const updated = {
          ...entry.host,
          enabled: entry.host.enabled === '1' ? '0' : '1'
        };
    
        await this.client.setUnboundHost(uuid, updated);
        await this.applyChanges();
      } catch (error: any) {
        console.error('Failed to toggle blocklist entry:', error);
        throw new Error(`Failed to toggle blocklist entry: ${error.message}`);
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Enable/disable' implies a state mutation, but the description doesn't specify whether this requires admin permissions, what happens to dependent systems, whether the change is immediate or requires restart, or what the expected response format is. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple toggle operation and front-loads the essential information without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter mutation tool with no annotations and no output schema, the description provides the basic purpose but lacks important context. It doesn't explain what 'enable/disable' means operationally, what systems are affected, error conditions, or return values. While concise, it leaves the agent with significant uncertainty about the tool's behavior and effects.

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 'uuid' parameter fully documented in the schema. The description adds no parameter-specific information beyond what's already in the schema (which states 'UUID of the blocklist entry'). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't need to compensate for schema gaps.

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 ('Enable/disable') and the resource ('a DNS blocklist entry'), providing a specific verb+resource combination. It distinguishes from obvious siblings like 'block_domain' or 'unblock_domain' by focusing on toggling rather than creating/removing entries. However, it doesn't explicitly differentiate from 'toggle_firewall_rule' which has a similar naming pattern but different domain.

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. It doesn't mention prerequisites (e.g., needing an existing blocklist entry), when-not scenarios, or direct alternatives like using separate enable/disable tools if they existed. The agent must infer usage from the name and context 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