Skip to main content
Glama

security_ufw_check

Read-only

UFW firewall rules audit — Offline audit of Ubuntu UFW firewall output (text= from sudo ufw status verbose or ufw status numbered). Parses status, default policies, logging and every rule (ports, ranges, app profiles like OpenSSH/Nginx Full, interfaces, IPv6, comments), then flags an inactive firewall, default allow incoming/routed, allow-all rules, databases/caches/admin ports open to anywhere (Redis, MongoDB, Elasticsearch, MySQL, PostgreSQL, Docker API, etcd, kubelet, RDP, SMB...), SSH without ufw limit, wide port ranges, TCP+UDP opened for TCP services, rules shadowed by first-match order (an ALLOW after a DENY that never applies, or the reverse), missing v6 rules and the Docker bypass. Returns EXPOSED/FIX REQUIRED/REVIEW/PASS, score, grade, parsed rules and exact ufw fix commands. Price: $0.005 USDC (Base, via x402).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "security_ufw_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoStatus: active Logging: on (low) Default: deny (incoming), allow (outgoing), allow (routed) To Action From -- ------ ---- 22/tcp ALLOW IN Anywhere 6379 ALLOW IN Anywhere 3306/tcp DENY IN Anywhere 3306/tcp ALLOW IN 10.0.0.0/8

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: this is a static text parse with no host access, it enumerates the checks it performs (shadowed rules, missing v6 rules, Docker bypass), names the verdict enum, and discloses a $0.005 x402 charge. The only mismatch is that openWorldHint=true suggests external interaction while the description bills it as an offline audit, and it does not say how large an input it tolerates or whether parsing failures error out.

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

Conciseness3/5

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

Purpose is front-loaded in the first clause and every section is informative, but it is one dense run-on sentence with long parenthetical port/service lists (Redis, MongoDB, Elasticsearch, …) that slow scanning. Splitting the check catalog from the input/price facts would read better.

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

Completeness4/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 carries the return contract itself and does so: verdict set, score, grade, parsed rules, and exact ufw fix commands. Missing only edge behavior (malformed input, alternate UFW output formats) and confirmation of the offline-vs-openWorld annotation tension.

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 3 is the floor, and the description exceeds it by telling the agent exactly which commands produce valid input for `text`, not just what the field looks like. It does not discuss whether the required=false `text` param yields a useful default when omitted.

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 ("UFW firewall rules audit") and pins the exact artifact it consumes ("Ubuntu UFW firewall output"). Naming UFW explicitly separates it from security_iptables_check and security_nftables_check without needing to enumerate those siblings.

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?

Gives concrete collection guidance: feed it `sudo ufw status verbose` or `ufw status numbered`, and it is explicitly an offline/text-based audit. It stops short of any exclusion statement (e.g. "for iptables use security_iptables_check"), so the when-not is left implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources