> ## Documentation Index
> Fetch the complete documentation index at: https://docs.civic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Block & Restrict

> Hide tools from the AI entirely, or block requests that match unsafe patterns

Tool blocking lets you control exactly what your AI agent can do — hiding entire tools from view, or stopping specific requests before they execute.

## Disable specific tools

Use `Hook_Filter` with a `disabled` list to hide tools the AI should never use. Disabled tools don't appear in the AI's tool list at all — it can't call what it can't see.

**Example** — prevent the AI from deleting calendar events or sending emails:

```json theme={null}
{ "disabled": ["delete_event", "draft_gmail_message"] }
```

Ask the Configurator Agent:

> "Hide the delete\_event tool on my Google Calendar server"

> "Remove send capabilities from Gmail — draft only"

## Whitelist: only allow specific tools

Use an `enabled` list to restrict a server to exactly the tools you want. Every other tool on that server is hidden.

**Example** — lock GitHub to read-only operations:

```json theme={null}
{ "enabled": ["get_repository", "list_issues", "search_repositories", "get_pull_request"] }
```

> "Limit my GitHub server to search and read tools only"

Whitelisting is the safer default for production agents — you explicitly opt in to each capability rather than blocking known risks.

## Block by parameter pattern

Request guardrails block tool calls when an input matches a pattern — even if the tool itself is visible.

**Example** — block GitHub code searches for secrets:

> "Add a guardrail to block code searches containing 'password', 'api\_key', or 'secret'"

**Example** — prevent SQL queries that drop or truncate tables:

> "Block any PostgreSQL query containing DROP TABLE or TRUNCATE"

## Common blocking patterns by server

| Server               | Recommended blocks                                |
| -------------------- | ------------------------------------------------- |
| `google-calendar`    | `delete_event`, `modify_event` (attendee changes) |
| `google-gmail`       | `delete_gmail_filter`, `create_gmail_filter`      |
| `google-drive`       | any file deletion tools                           |
| `google-docs`        | `find_and_replace_doc` (bulk destructive)         |
| `github-remote`      | `delete_repository`, `delete_branch`              |
| `postgres` / `mysql` | DROP, TRUNCATE, DELETE without WHERE              |
| `slack`              | `delete_message`, `kick_user_from_channel`        |

## Blocking vs revocation

Blocking (via guardrails) hides or restricts a tool while keeping the server connection intact. [Revocation](/civic/concepts/revocation) severs the connection entirely.

Use blocking for ongoing least-privilege configuration. Use revocation when responding to an incident.

## How to configure

Ask the Configurator Agent in Civic Chat, or configure directly in the Civic UI under your toolkit's guardrail settings.

```
Action: update
Category: Hook_Filter
MCP Server: google-calendar
Value: { "disabled": ["delete_event"] }
```
