# query-hats-by-wearer

Find all hats currently worn by a specific address, grouped by tree with metadata

Agent View of the PolicyLayer registry record for `query-hats-by-wearer`. HTML page: https://policylayer.com/tools/dennisonbertram-mcp-hats/query-hats-by-wearer

## Facts

- Tool: `query-hats-by-wearer`
- Server: Hats Protocol MCP Server (`dennisonbertram/mcp-hats`) — https://policylayer.com/tools/dennisonbertram-mcp-hats.md
- Homepage: https://github.com/dennisonbertram/mcp-hats
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "query-hats-by-wearer",
    "arguments": {}
  }
}
```

## Why query-hats-by-wearer is rated Low

This tool queries blockchain data to retrieve information about which roles/permissions (hats) an address currently holds. It performs no writes, deletions, financial transactions, or code execution. The operation is purely informational and read-only.

From the tool's own definition: "Tool description states 'Find all hats currently worn by a specific address, grouped by tree with metadata' - a retrieval operation with no modification or side effects."

## Use case

AI agents call query-hats-by-wearer to retrieve information from Hats Protocol MCP Server without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Hats Protocol MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "query-hats-by-wearer": {}
  }
}
```

## Other tools on Hats Protocol MCP Server (10)

- `prepare-burn-hat` — Destructive — https://policylayer.com/tools/dennisonbertram-mcp-hats/prepare-burn-hat.md
- `check-hat-wearer` — Read — https://policylayer.com/tools/dennisonbertram-mcp-hats/check-hat-wearer.md
- `get-hat-details` — Read — https://policylayer.com/tools/dennisonbertram-mcp-hats/get-hat-details.md
- `get-tree-structure` — Read — https://policylayer.com/tools/dennisonbertram-mcp-hats/get-tree-structure.md
- `list-networks` — Read — https://policylayer.com/tools/dennisonbertram-mcp-hats/list-networks.md
- `prepare-create-hat` — Write — https://policylayer.com/tools/dennisonbertram-mcp-hats/prepare-create-hat.md
- `prepare-mint-hat` — Write — https://policylayer.com/tools/dennisonbertram-mcp-hats/prepare-mint-hat.md
- `prepare-mint-top-hat` — Write — https://policylayer.com/tools/dennisonbertram-mcp-hats/prepare-mint-top-hat.md
- `prepare-transfer-hat` — Write — https://policylayer.com/tools/dennisonbertram-mcp-hats/prepare-transfer-hat.md
- `set-api-key` — Write — https://policylayer.com/tools/dennisonbertram-mcp-hats/set-api-key.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=dennisonbertram-mcp-hats · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/dennisonbertram-mcp-hats
