> For the complete documentation index, see [llms.txt](https://help.nightfall.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.nightfall.ai/developer-api/nightfall_apis/nightfall-model-context-protocol-mcp-server/available-tools.md).

# Available Tools

The Nightfall MCP server provides 35 tools that your AI client can call against your Nightfall tenant. The tools fall into eight categories:

| Category                         | Tools | What They Cover                                                                                   |
| -------------------------------- | ----- | ------------------------------------------------------------------------------------------------- |
| Detection and Response incidents | 6     | Data loss prevention (DLP) policy violations, their findings, and remediation                     |
| Data Exfiltration incidents      | 5     | Exfiltration attempts and suspicious file activity                                                |
| Posture Management incidents     | 5     | Configuration risks and permission changes                                                        |
| Forensic Search                  | 2     | Endpoint, browser, cloud-sync, git, clipboard, removable-media, print, MCP, and AI-agent activity |
| Activity tools                   | 2     | User and asset activity across all event types                                                    |
| Policy configuration             | 4     | Users and domains in a Google Drive policy's scope                                                |
| AI governance                    | 6     | MCP servers, agent plugins, agent hooks, and IDE extensions on managed endpoints                  |
| App Intelligence                 | 5     | SaaS and AI application usage across your tenant                                                  |

Of the 35 tools, 28 only read data. The other seven modify data, and any enabled API key can call them. Before you connect an agent that runs tools unattended, review the tool safety annotations and the tools that modify data, both described below.

This topic also describes how the server handles sensitive data in tool responses, the fields you can use in queries, and the server's error handling, pagination, and rate limits.

***

## Tool safety annotations

Every tool the server advertises carries the standard MCP annotations, so an agent harness can decide what to run unattended and what to confirm with a person first. All four fields are always present, and none is left to its default.

| Annotation        | Meaning                                                                            |
| ----------------- | ---------------------------------------------------------------------------------- |
| `readOnlyHint`    | The tool does not modify anything. True for all 28 read tools.                     |
| `destructiveHint` | The tool may make changes that Nightfall cannot undo.                              |
| `idempotentHint`  | Repeating the call with identical arguments has no further effect.                 |
| `openWorldHint`   | The effect lands in a connected third-party system rather than in Nightfall alone. |

Tools fall into exactly three profiles:

| Profile      | Tools                 | `readOnlyHint` | `destructiveHint` | `idempotentHint` | `openWorldHint` |
| ------------ | --------------------- | -------------- | ----------------- | ---------------- | --------------- |
| Read         | 28                    | `true`         | `false`           | `true`           | `false`         |
| Remediation  | 3 × `take_action_*`   | `false`        | `true`            | `false`          | `true`          |
| Policy scope | 4 × `update_policy_*` | `false`        | `true`            | `true`           | `false`         |

Remediation tools are open-world because the action executes in Google Drive, Slack, GitHub, Jira, or Microsoft Teams. They are non-idempotent because a repeated call sends another notification or files another ticket.

Policy-scope tools stay inside Nightfall, but count as destructive because a call can remove entries from a policy's scope, which silently ends DLP coverage for those users or domains. They are idempotent: the payload is a target state, not a delta, so retrying a call that timed out is safe.

The server does not scope tools per key: any enabled API key can call all 35 tools, including the seven that modify data. Your key determines which tenant's data is reachable, not which tools may be used.

{% hint style="info" %}
**Note**:

Annotations are advisory metadata for the calling harness, not an access control. A well-behaved harness uses them to decide when to ask a person first, but they do not stop an unauthorized call. Control access by controlling who holds the key, and by running a harness that honors the annotations.
{% endhint %}

***

## Tools by category

Each table below lists the tools in one category and whether each tool is read-only or destructive.

### Detection and Response incidents (6 tools)

Use these tools to work with DLP policy violations detected across your integrations.

| Tool Name                   | Description                                                       | Safety          |
| --------------------------- | ----------------------------------------------------------------- | --------------- |
| `search_violations`         | Search violations using structured queries (`field:value` syntax) | Read-only       |
| `list_violations`           | Browse recent violations with date range filters                  | Read-only       |
| `get_violation`             | Get full details for a specific violation, excluding its findings | Read-only       |
| `get_violation_findings`    | View the masked sensitive data findings within a violation        | Read-only       |
| `get_violation_activity`    | Review activity timeline and remediation history                  | Read-only       |
| `take_action_on_violations` | Execute remediation actions (resolve, quarantine, delete, etc.)   | **Destructive** |

### Data Exfiltration incidents (5 tools)

Use these tools to investigate data exfiltration attempts and suspicious file activity.

| Tool Name                            | Description                                        | Safety          |
| ------------------------------------ | -------------------------------------------------- | --------------- |
| `search_exfiltration_events`         | Search exfiltration events with advanced filters   | Read-only       |
| `list_exfiltration_events`           | Browse recent exfiltration events                  | Read-only       |
| `get_exfiltration_event`             | Get complete event details and affected assets     | Read-only       |
| `get_exfiltration_event_activity`    | View event timeline and status changes             | Read-only       |
| `take_action_on_exfiltration_events` | Execute remediation actions on exfiltration events | **Destructive** |

### Posture Management incidents (5 tools)

Use these tools to monitor configuration risks and permission changes.

| Tool Name                       | Description                                   | Safety          |
| ------------------------------- | --------------------------------------------- | --------------- |
| `search_posture_events`         | Search for security posture issues            | Read-only       |
| `list_posture_events`           | Browse recent posture events                  | Read-only       |
| `get_posture_event`             | Get detailed event information                | Read-only       |
| `get_posture_event_activity`    | View event activity history                   | Read-only       |
| `take_action_on_posture_events` | Execute remediation actions on posture events | **Destructive** |

### Forensic Search (2 tools)

Use these tools to search Forensic Search events: endpoint, browser, cloud-sync, git, clipboard, removable-media, print, MCP, and AI-agent activity, with app and content risk.

| Tool Name                | Description                                                                                                                   | Safety    |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | --------- |
| `search_forensic_events` | Search Forensic Search events within a time window of up to 7 days. Results include scan metadata only, never matched content | Read-only |
| `get_forensic_event`     | Get a single Forensic Search event by its event ID and event timestamp                                                        | Read-only |

{% hint style="info" %}
**Note**:

Forensic Search data can lag by about an hour. `search_forensic_events` stops paginating after 500 results, so narrow the time window or add filters to see more.
{% endhint %}

### Activity tools (2 tools)

Use these tools to track user and asset activity across all event types.

| Tool Name            | Description                              | Safety    |
| -------------------- | ---------------------------------------- | --------- |
| `get_actor_activity` | Get complete user activity history       | Read-only |
| `get_asset_activity` | Track file and document activity history | Read-only |

### Policy configuration (4 tools)

Use these tools to adjust which users and domains a policy applies to. These tools support Google Drive policies only.

| Tool Name                            | Description                                                         | Safety          |
| ------------------------------------ | ------------------------------------------------------------------- | --------------- |
| `update_policy_user_scope`           | Add or remove users in a DLP policy's user scope, by email          | **Destructive** |
| `update_policy_domain_scope`         | Add or remove domains in a DLP policy's domain scope                | **Destructive** |
| `update_policy_trigger_user_scope`   | Add or remove trigger-scoped users on a posture management policy   | **Destructive** |
| `update_policy_trigger_domain_scope` | Add or remove trigger-scoped domains on a posture management policy | **Destructive** |

{% hint style="info" %}
**Note**:

Removing an entry from a policy's scope ends DLP coverage for it. These tools take an `add` and a `delete` payload in one call and return the full resulting include and exclude lists, so the response is the place to confirm what the policy now covers.
{% endhint %}

### AI governance (6 tools)

Use these tools to inventory the AI tooling discovered across managed endpoints: MCP servers, agent plugins, agent hooks, and IDE extensions.

| Tool Name                 | Description                                                                                                                   | Safety    |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------- |
| `list_ai_inventory`       | List any AI inventory. Set `type` to `mcp_server`, `plugin`, `hook`, or `ide_extension`, and `scope` to `company` or `device` | Read-only |
| `list_mcp_servers`        | Browse discovered MCP servers with device counts, usage, and risk                                                             | Read-only |
| `get_mcp_server`          | Get one MCP server, including public registry metadata when matched                                                           | Read-only |
| `list_mcp_server_devices` | List the devices using a given MCP server, with a per-client breakdown                                                        | Read-only |
| `list_mcp_devices`        | List devices that have any MCP server installed                                                                               | Read-only |
| `get_device_mcp_servers`  | Get one device and every MCP server running on it                                                                             | Read-only |

{% hint style="info" %}
IDs returned by these tools are opaque. Pass an `id` back exactly as returned: it encodes the full identity of the row it came from, and for plugins that includes the version, so two versions of one plugin have two different IDs. An edited or reconstructed ID does not resolve.
{% endhint %}

### App Intelligence (5 tools)

Use these tools to review the SaaS and AI application usage discovered across your tenant.

| Tool Name                               | Description                                                                                    | Safety    |
| --------------------------------------- | ---------------------------------------------------------------------------------------------- | --------- |
| `app_intelligence_list_apps`            | List discovered applications, with filtering and sorting                                       | Read-only |
| `app_intelligence_get_app_details`      | Get details for one application                                                                | Read-only |
| `app_intelligence_get_app_destinations` | Get the destinations an application sends data to                                              | Read-only |
| `app_intelligence_get_summary_stats`    | Get summary statistics for a date range (`fromDate` and `toDate`, both required, Unix seconds) | Read-only |
| `app_intelligence_list_categories`      | List available application categories                                                          | Read-only |

***

## Tools that modify data

Seven of the 35 tools change state. Each is annotated `readOnlyHint: false` and `destructiveHint: true`, and a harness that honors annotations asks before running them. The other 28 only read.

| Tool Name                            | What It Changes                                                                                                         |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| `take_action_on_violations`          | Remediates in the connected SaaS tenant, including `HARD_DELETE`, `DELETE_FILE`, `REVOKE_ACCESS`, and `SUSPEND_ACCOUNT` |
| `take_action_on_exfiltration_events` | Remediates exfiltration events with access control and notification actions                                             |
| `take_action_on_posture_events`      | Remediates posture events with access control and notification actions                                                  |
| `update_policy_user_scope`           | Adds or removes users from a DLP policy's scope                                                                         |
| `update_policy_domain_scope`         | Adds or removes domains from a DLP policy's scope                                                                       |
| `update_policy_trigger_user_scope`   | Adds or removes users from a posture policy's trigger scope                                                             |
| `update_policy_trigger_domain_scope` | Adds or removes domains from a posture policy's trigger scope                                                           |

***

## Sensitive data in tool responses

The MCP server never returns unmasked finding values. `get_violation` returns no findings, and `get_violation_findings` returns each finding value masked exactly as it appears in the Nightfall console's default view. The MCP server never returns unmasked values, even when console users have unmasked viewing enabled. The masking format depends on the integration.

Each finding can include a text excerpt showing the words before and after the match. Any other sensitive data Nightfall detected in that excerpt is masked. The rest is shown as-is so you can see the finding's location. The excerpt is omitted when no surrounding text is available.

Finding excerpts in activity feeds use the same masked values as the console.

{% hint style="info" %}
**Note**:

Masking applies only to data that Nightfall detected. Text in a finding excerpt that Nightfall did not detect as sensitive is returned as-is, so an AI agent connected to the MCP server can still receive it.
{% endhint %}

***

## Query field reference

Use the following searchable fields to build advanced queries for each event type.

### Detection and Response incident fields

These fields apply to DLP violations.

#### Core fields

* `state`: `ACTIVE`, `PENDING`, `RESOLVED`, `EXPIRED`
* `integration_name`: `github`, `gdrive`, `slack`, `confluence`, `jira`, `salesforce`, `teams`, `onedrive`, etc.
* `risk_label`: `HIGH`, `MEDIUM`, `LOW`
* `user_email`, `user_name`: Filter by specific users
* `last_actioned_by`: `NIGHTFALL`, `ADMIN`, `END_USER`
* `confidence`: Detection confidence level
* `policy_id`, `detection_rule_id`, `detector_id`: Policy and rule identifiers

#### Integration-specific fields

| Integration     | Fields                                                                                                                                                                                                                                    |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Slack           | `slack.channel_name`, `slack.channel_id`, `slack.workspace`                                                                                                                                                                               |
| GitHub          | `github.org`, `github.repository`, `github.repository_owner`, `github.branch`, `github.commit`, `github.author_email`                                                                                                                     |
| Google Drive    | `gdrive.drive`                                                                                                                                                                                                                            |
| Confluence      | `confluence.space_name`, `confluence.parent_page_name`                                                                                                                                                                                    |
| Jira            | `jira.project_name`, `jira.ticket_number`                                                                                                                                                                                                 |
| Salesforce      | `salesforce.org_name`, `salesforce.object`, `salesforce.record_id`                                                                                                                                                                        |
| Microsoft Teams | `teams.team_name`, `teams.channel_name`, `teams.channel_type`, `teams.team_sensitivity`, `teams.sender`, `teams.msg_importance`, `teams.msg_attachment`, `teams.chat_id`, `teams.chat_type`, `teams.chat_topic`, `teams.chat_participant` |
| OneDrive        | `onedrive.drive_owner`, `onedrive.drive_owner_email`, `onedrive.file_name`, `onedrive.created_by`, `onedrive.created_by_email`, `onedrive.modified_by`, `onedrive.modified_by_email`                                                      |
| Zendesk         | `zendesk.ticket_status`, `zendesk.ticket_title`, `zendesk.ticket_group_assignee`, `zendesk.current_user_role`                                                                                                                             |
| Notion          | `notion.created_by`, `notion.last_edited_by`, `notion.page_title`, `notion.workspace_name`                                                                                                                                                |
| Gmail           | `gmail.user_name`, `gmail.from`, `gmail.to`, `gmail.cc`, `gmail.bcc`, `gmail.thread_id`, `gmail.subject`, `gmail.attachment_name`, `gmail.attachment_type`                                                                                |

### Data Exfiltration Prevention incident fields

These fields apply to exfiltration events.

#### Core fields

* `event_type`: `file_download`, `file_upload`, `permission_change`, etc.
* `state`: `ACTIVE`, `PENDING`, `RESOLVED`, `EXPIRED`
* `last_actioned_by`: `NIGHTFALL`, `ADMIN`, `END_USER`

#### Actor fields

* `actor_name`, `actor_email`
* `user_name`, `user_email` (backward compatible aliases)

#### Resource fields

* `resource_id`, `resource_name`, `resource_owner_name`, `resource_owner_email`, `resource_content_type`, `notes`

#### Endpoint fields

* `endpoint.device_id`, `endpoint.machine_name`

#### Integration-specific fields

| Integration  | Fields                                                                                                                                                                                                                                                      |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Google Drive | `gdrive.permission`, `gdrive.shared_internal_email`, `gdrive.shared_external_email`, `gdrive.drive`, `gdrive.file_owner`, `gdrive.label_name`                                                                                                               |
| Salesforce   | `salesforce.report.scope`, `salesforce.report.event_source`, `salesforce.report.source_ip`, `salesforce.report.session_level`, `salesforce.report.operation`, `salesforce.report.description`, `salesforce.file.source_ip`, `salesforce.file.session_level` |

### Posture Management incident fields

Security posture events support the same query fields as exfiltration events.

### Query operators

Combine fields with these operators:

* `AND`: Combine multiple conditions. Both must match.
* `OR`: Combine alternative conditions. Either can match.
* `field:value`: Match a field's exact value.

For example:

```
integration_name:github AND risk_label:HIGH AND state:ACTIVE
```

### Common query patterns

To find violations by user and integration:

```
user_email:jane@example.com AND integration_name:slack
```

To search across multiple users:

```
user_email:jane@example.com OR user_email:john@example.com
```

To filter by channel and state:

```
slack.channel_name:general AND state:PENDING
```

### Sorting and time filters

Time filters are separate parameters, not part of the query string. `search_violations` accepts these parameters alongside `query`:

* `sort`: `TIME_DESC`, `TIME_ASC`, `RELEVANCE`, `RISK_DESC`, `RISK_ASC`
* `createdAfter`, `createdBefore`, `updatedAfter`: Unix timestamps, as integers
* `limit`: The number of results per page, from 1 to 100. The default is 50.

***

## Error handling

The MCP server returns structured errors in tool responses:

| Error Code       | Description                                     |
| ---------------- | ----------------------------------------------- |
| `UNAUTHORIZED`   | Missing or invalid API key                      |
| `INVALID_INPUT`  | Malformed parameters or invalid values          |
| `NOT_FOUND`      | The requested violation or event does not exist |
| `SERVICE_ERROR`  | Backend service failure. Retry after a moment.  |
| `INTERNAL_ERROR` | Unexpected system error                         |

The API gateway returns these HTTP-level errors:

| Status                  | Description                                                   |
| ----------------------- | ------------------------------------------------------------- |
| `401 Unauthorized`      | Invalid or missing API key                                    |
| `429 Too Many Requests` | Rate limit or quota exceeded. Check the `Retry-After` header. |

***

## Pagination

Tools that return lists support cursor-based pagination. When more results are available, the response includes a `nextPageToken` field. Pass this value as `pageToken` in your next request to fetch the next page.

To get the next page, ask your AI client: "Show me the next page of results". The AI client handles pagination automatically when you ask for more results.

***

## Rate limits

MCP requests share the same rate limits and quotas as the Nightfall REST API. If you receive a `429` response, wait for the duration indicated in the `Retry-After` header before retrying.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.nightfall.ai/developer-api/nightfall_apis/nightfall-model-context-protocol-mcp-server/available-tools.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
