# apply_template

Scaffold a new project from a template. Creates files and directories in the target path within the workspace. Safe — cannot write outside workspace root.

Agent View of the PolicyLayer registry record for `apply_template`. HTML page: https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/apply-template

## Facts

- Tool: `apply_template`
- Server: Terminal Guardian (`7majesty-m/terminal-guardian-mcp`) — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp.md
- Homepage: https://github.com/7Majesty-M/terminal-guardian-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

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

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

## Why apply_template is rated Medium

The tool creates files and directories, which are reversible write operations (files can be deleted). While scoped to a workspace root for safety, mass creation of files could consume disk space or interfere with existing project structures.

From the tool's own definition: "Tool description states it 'Creates files and directories in the target path within the workspace.' This is explicitly a write operation that modifies the filesystem by creating new content."

Risk signals: Admin/system-level operation

## Use case

AI agents use apply_template to create or update resources in Terminal Guardian, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Terminal Guardian environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Terminal Guardian:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "apply_template": {
      "limits": [
        {
          "counter": "apply_template_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Terminal Guardian (24)

- `kill_process` — Destructive — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/kill-process.md
- `docker_exec` — Execute — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/docker-exec.md
- `ping` — Execute — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/ping.md
- `run_command` — Execute — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/run-command.md
- `ssh_exec` — Execute — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/ssh-exec.md
- `ssh_test` — Execute — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/ssh-test.md
- `hello` — Other — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/hello.md
- `analyze_command` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/analyze-command.md
- `dns_lookup` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/dns-lookup.md
- `docker_logs` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/docker-logs.md
- `docker_ps` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/docker-ps.md
- `docker_stats` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/docker-stats.md
- `get_env` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/get-env.md
- `git_diff` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/git-diff.md
- `git_log` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/git-log.md
- `git_status` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/git-status.md
- `git_suggest_commit` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/git-suggest-commit.md
- `http_request` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/http-request.md
- `list_files` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/list-files.md
- `list_processes` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/list-processes.md
- `list_templates` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/list-templates.md
- `read_file` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/read-file.md
- `search_files` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/search-files.md
- `ssh_list_profiles` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/ssh-list-profiles.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=7majesty-m-terminal-guardian-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/7majesty-m-terminal-guardian-mcp
