Skip to main content
Glama
amittell

firewalla-mcp-server

search_rules

Read-only

Search firewall rules by action, target, status, protocol, or notes using Firewalla query syntax. Scope results to one box when configured, otherwise query every box.

Instructions

Search firewall rules by target, action or status; the MSP API applies the query (GET /v2/rules). Supports all rule fields. Scoped to FIREWALLA_BOX_ID when set, otherwise every box.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of rules to return
queryYesSearch query using Firewalla syntax. Terms joined by spaces or AND must all match; OR works between values of one field (sent as a comma list, e.g. region:US,CN) and is refused across fields; NOT or a leading - excludes. A word or quoted phrase with no field is free text, matched case-insensitively in the name, notes, action, target type or value, or scope of each rule (GET /v2/rules matches no free text, so the words are not sent and every rule the other terms match is read; free_text_coverage says how many were checked and whether that was all). Supported fields: action:allow/block/timelimit, target.type:domain/ip/device, target.value:*.facebook.com, status:active/paused, direction:bidirection/inbound/outbound, protocol:tcp/udp, box.id:box_gid, scope.type:device/network, notes:"description text". Examples: "action:block AND target.value:*.social.com", "status:paused", "target.type:domain AND action:block"
response_formatNoResponse format. 'json' (default): the compact JSON response. 'markdown': the same response as readable markdown, its fields as bullet lists and each list of records as a table of up to 8 columns and DEFAULT_PAGE_SIZE rows (default 100), ending with a line that says what the view leaves out. Omitted or null: 'json'. Errors are JSON either way.json

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.0.1
    • addedInput schema / properties / limit / default
      Added value: +200
    • addedInput schema / properties / limit / maximum
      Added value: +1000
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedInput schema / properties / query / description
      Previous value: -"Search query using Firewalla syntax. Supported fields: action:allow/block/timelimit, target.type:domain/ip/device, target.value:*.facebook.com, status:active/paused, direction:bidirection/inbound/outbound, protocol:tcp/udp, box.id:box_gid, scope.type:device/network, notes:\"description text\". Examples: \"action:block AND target.value:*.social.com\", \"status:paused\", \"target.type:domain AND action:block\""New value: +"Search query using Firewalla syntax. Terms joined by spaces or AND must all match; OR works between values of one field (sent as a comma list, e.g. region:US,CN) and is refused across fields; NOT or a leading - excludes. A word or quoted phrase with no field is free text, matched case-insensitively in the name, notes, action, target type or value, or scope of each rule (GET /v2/rules matches no free text, so the words are not sent and every rule the other terms match is read; free_text_coverage says how many were checked and whether that was all). Supported fields: action:allow/block/timelimit, target.type:domain/ip/device, target.value:*.facebook.com, status:active/paused, direction:bidirection/inbound/outbound, protocol:tcp/udp, box.id:box_gid, scope.type:device/network, notes:\"description text\". Examples: \"action:block AND target.value:*.social.com\", \"status:paused\", \"target.type:domain AND action:block\""
    • addedInput schema / properties / response_format
      Added value: +{
      +  "default": "json",
      +  "description": "Response format. 'json' (default): the compact JSON response. 'markdown': the same response as readable markdown, its fields as bullet lists and each list of records as a table of up to 8 columns and DEFAULT_PAGE_SIZE rows (default 100), ending with a line that says what the view leaves out. Omitted or null: 'json'. Errors are JSON either way.",
      +  "enum": [
      +    "json",
      +    "markdown",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed1 schema field changedv1.5.0
    • changedInput schema / properties / query / description
      Previous value: -"Search query using Firewalla syntax. Supported fields: action:allow/block/timelimit, target.type:domain/ip/device, target.value:*.facebook.com, status:active/paused, direction:bidirection/inbound/outbound, protocol:tcp/udp, gid:box_id, scope.type:device/network, notes:\"description text\". Examples: \"action:block AND target.value:*.social.com\", \"status:paused\", \"target.type:domain AND action:block\""New value: +"Search query using Firewalla syntax. Supported fields: action:allow/block/timelimit, target.type:domain/ip/device, target.value:*.facebook.com, status:active/paused, direction:bidirection/inbound/outbound, protocol:tcp/udp, box.id:box_gid, scope.type:device/network, notes:\"description text\". Examples: \"action:block AND target.value:*.social.com\", \"status:paused\", \"target.type:domain AND action:block\""
  3. Changed2 schema fields changedv1.3.0
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Maximum number of rules to return",
      +  "type": "number"
      +}
    • changedInput schema / required
      Previous value: -[]New value: +[
      +  "query"
      +]
  4. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true) and open-world scope, so little is owed here, yet the description still adds real behavioral context: that filtering is applied server-side by the MSP API via GET /v2/rules, and that results are confined to one box when FIREWALLA_BOX_ID is set and across all boxes otherwise. It stops short of describing pagination/limit interaction or result shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short clauses with zero filler; the core verb+resource and the endpoint are front-loaded, and the scope caveat follows. It is efficiently sized for a three-parameter tool, with only minor denseness from packing endpoint and scope into a semicolon clause.

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?

With no output schema, the description still gives the agent enough to call correctly: the operation is a read (annotations), the backend call and scope are named, and the full query grammar and response_format behavior live in the schema. Nothing essential for correct invocation is missing.

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%, so the schema already carries full parameter meaning (including the detailed Firewalla query syntax and response_format semantics). The description's only added claim, 'Supports all rule fields', is too vague to add meaning beyond the enum of fields already enumerated in the schema, so the baseline 3 applies.

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 gives a specific verb and resource ('Search firewall rules') plus the searchable facets (target, action, status) and the backing endpoint (GET /v2/rules), so the purpose is unambiguous. It does not, however, distinguish itself from sibling list/read tools such as get_network_rules or get_network_rules_summary, which is why it falls short of a 5.

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?

There is no statement of when to use this tool versus the sibling rules tools (get_network_rules, get_network_rules_summary, get_rule_trends). The only conditional is a scoping rule ('Scoped to FIREWALLA_BOX_ID when set, otherwise every box'), which describes result scope rather than tool selection, so an agent gets essentially no routing guidance.

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