Skip to main content
Glama

Add AdGuard Home filter list

adguard_add_filter
Idempotent

Adds a filter list URL to AdGuard Home and waits up to 180 seconds for download and parsing, so large blocklists complete when Home Assistant's 10-second service call times out.

Instructions

Add a filter list URL to AdGuard Home, waiting up to 180 s for AdGuard to download and parse it.

Reads filtering/status and, if the URL is not on either list yet, sends POST /control/filtering/add_url {name, url, whitelist}; AdGuard downloads and parses the list inside that request and enables it. Then re-reads filtering/status.

Use when: adding a filter list, especially a large one — HA's adguard.add_url service gives up after 10 s and then adds nothing. Not for: refreshing lists — use the HA adguard.refresh service; removing or toggling a list — use adguard_remove_filter or adguard_set_filter_enabled. Returns: {"added": true, "addon_slug", "list", "filter": {name, url, enabled, rules_count, last_updated}, "total_rules"}; total_rules sums the enabled lists of the same kind. Errors: invalid_name, invalid_url (no I/O), already_exists (with list and filter, nothing sent), HTTP <status> with AdGuard's detail, timeout, and the add-on lookup errors of adguard_get_config. Limits: after a timeout AdGuard may still finish adding the list.

Input Schema

NameRequiredDescriptionDefault
urlYeshttps:// URL of the rule list, e.g. `https://adguardteam.github.io/HostlistsRegistry/assets/filter_1.txt`; http:// and local file paths are rejected.
nameYesDisplay name of the list in AdGuard, e.g. `HaGeZi TIF medium`; must not be empty.
allowlistNoTrue adds it as an allowlist (AdGuard `whitelist`); false (default) as a blocklist.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.28.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations cover safety hints, but the description goes well beyond them: it discloses the internal read → POST /control/filtering/add_url → re-read sequence, the 180 s wall clock, the full error taxonomy (invalid_name, invalid_url, already_exists with no I/O performed, HTTP status with AdGuard detail, timeout), and the important caveat that a timeout does not mean the list wasn't added. The idempotent skip when the URL is already present is consistent with idempotentHint=true.

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?

Front-loaded with the action and its 180 s cost, then cleanly segmented into Use when / Not for / Returns / Errors / Limits. Dense but every line carries operational information an agent needs before invoking.

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?

For a network-bound mutation with 3 params, the definition covers trigger conditions, side effects, timeout behavior, error recovery signals, and return shape (even though an output schema exists, the summary aids planning). Nothing an agent needs in order to call it correctly is missing.

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?

Schema coverage is 100%, so the baseline is 3; the description adds marginal value by revealing the wire payload `{name, url, whitelist}`, which clarifies that the schema's `allowlist` maps to AdGuard's `whitelist` field. It does not add format rules beyond what the schema already states (https-only, non-empty name).

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?

States a specific verb and resource ("Add a filter list URL to AdGuard Home") plus the key operational scope (waits up to 180 s for download/parse). It also names the exact sibling tools it is not: adguard_remove_filter, adguard_set_filter_enabled, and the HA adguard.refresh service.

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

Usage Guidelines5/5

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

Explicit "Use when" block (adding a filter list, especially a large one) with the concrete motivating failure of the alternative (adguard.add_url gives up after 10 s and adds nothing), and an explicit "Not for" block routing to the correct alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools