# get-tree-structure

Visualize the hierarchical structure of a hat tree with multiple output formats

Agent View of the PolicyLayer registry record for `get-tree-structure`. HTML page: https://policylayer.com/tools/dennisonbertram-mcp-hats/get-tree-structure

## Facts

- Tool: `get-tree-structure`
- 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": "get-tree-structure",
    "arguments": {}
  }
}
```

## Why get-tree-structure is rated Low

This tool retrieves and displays organizational hierarchy information without creating, modifying, deleting, or executing any operations. It is purely informational, analogous to a SELECT query in databases. The 'prepare-' prefixed siblings (prepare-mint-hat, prepare-transfer-hat, prepare-burn-hat) are the tools that would modify state; this tool only analyzes existing structure.

From the tool's own definition: "Tool name 'get-tree-structure' and description 'Visualize the hierarchical structure' indicate data retrieval and analysis with no side effects."

## Use case

AI agents call get-tree-structure 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": {
    "get-tree-structure": {}
  }
}
```

## 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
- `list-networks` — Read — https://policylayer.com/tools/dennisonbertram-mcp-hats/list-networks.md
- `query-hats-by-wearer` — Read — https://policylayer.com/tools/dennisonbertram-mcp-hats/query-hats-by-wearer.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
