Skip to main content
Glama
itunified-io

mcp-opnsense

by itunified-io

opnsense_dns_blocklist_sources_list

List available built-in DNS blocklist sources (AdGuard, EasyList, hagezi, Steven Black, etc.) with their internal IDs and selected state. Read-only.

Instructions

List all available built-in DNSBL block-list sources (curated feeds like AdGuard, EasyList, hagezi, Steven Black, etc.) with their internal IDs and selected state. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the opnsense_dns_blocklist_sources_list tool. Calls /unbound/settings/getDnsbl, extracts blocklist types, and returns a list of sources with id, name, and selected state.
    case "opnsense_dns_blocklist_sources_list": {
      const raw = (await client.get<{ blocklist?: { type?: Record<string, unknown> } }>(
        "/unbound/settings/getDnsbl",
      ));
      const types = raw?.blocklist?.type ?? {};
      const sources: Array<{ id: string; name: string; selected: boolean }> = [];
      for (const [id, v] of Object.entries(types)) {
        if (v && typeof v === "object") {
          const o = v as Record<string, unknown>;
          sources.push({
            id,
            name: String(o.value ?? ""),
            selected: o.selected === 1 || o.selected === "1",
          });
        }
      }
      return { content: [{ type: "text", text: JSON.stringify({ sources, total: sources.length }, null, 2) }] };
    }
  • Tool definition (schema) for opnsense_dns_blocklist_sources_list in the dnsToolDefinitions array. No input parameters required.
      name: "opnsense_dns_blocklist_sources_list",
      description:
        "List all available built-in DNSBL block-list sources (curated feeds like AdGuard, EasyList, hagezi, Steven Black, etc.) with their internal IDs and selected state. Read-only.",
      inputSchema: { type: "object" as const, properties: {} },
    },
  • src/index.ts:59-59 (registration)
    Registration mapping: every tool in dnsToolDefinitions (including opnsense_dns_blocklist_sources_list) is mapped to handleDnsTool handler.
    for (const def of dnsToolDefinitions) toolHandlers.set(def.name, handleDnsTool);
  • src/index.ts:83-95 (registration)
    MCP CallTool request handler: looks up tool name in toolHandlers map and delegates to the registered handler function.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
      const handler = toolHandlers.get(name);
    
      if (!handler) {
        return {
          content: [{ type: 'text' as const, text: `Unknown tool: ${name}` }],
          isError: true,
        };
      }
    
      return handler(name, (args ?? {}) as Record<string, unknown>, client);
    });
Behavior3/5

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

No annotations are provided. The description declares the tool as read-only and lists the output (IDs and selected state). It does not disclose additional behavioral traits like authentication requirements or rate limits, but for a simple list operation, this is minimally acceptable.

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 sentence with parenthetical examples. It is front-loaded with the action and resource, and every word adds value. No fluff or redundancy.

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

Completeness5/5

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

Given no output schema and no parameters, the description comprehensively explains the tool's purpose, input (none), and output (IDs and selected state). It is fully complete for a list operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, and schema coverage is 100%. The description adds value by explaining what data is returned (internal IDs and selected state) beyond what the schema provides. Following the rule '0 params = baseline 4', this score is appropriate.

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

Purpose5/5

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

The description clearly states it lists all available built-in DNSBL block-list sources, with examples like AdGuard, EasyList, and Steven Black. It specifies output includes internal IDs and selected state, and notes it is read-only. This distinguishes it from sibling tools like opnsense_dns_list_blocklist, which likely lists blocklists rather than sources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for listing sources before enabling them, but does not explicitly state when not to use this tool or mention alternatives. However, it is clear that this is for listing sources, not for managing blocklists, which is adequate given the sibling context.

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/itunified-io/mcp-opnsense'

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