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

# Agent tools

> Use Google Drive agent tools in Ravenna rules to search Drive files and share or unshare them with people.

Google Drive provides agent tools for finding files and managing who can open them. Reference them in agent rules (Natural language instructions defining agent behavior) using @ mentions so your agent can handle document access requests without a handoff.

***

## Find files

> [accordion] Search files
>
> Finds files shared with the service account. Combine filters to narrow the search. When a search reaches its limit, the result says so and the agent can add filters.
>
> **Tool name:** `@Search Google Drive Files`
>
> **Input fields:**
>
> * `keyword` - matches file names and content.
> * `name_contains` - text the file name contains.
> * `file_type` - `folder`, `document`, `spreadsheet`, `presentation`, `pdf`, `image`, or `video`.
> * `owner` - only files this person owns, as a Ravenna user ID or an email.
> * `modified_after` and `modified_before` - a modified date range.
> * `parent_folder_id` - only files in this folder.
> * `max_results` - up to 50. Defaults to 25.
>
> **Output data:**
>
> * `files` - each file's `id`, `name`, `mime_type`, and `web_view_link`.
> * `total_count` - how many files came back.
>
> **Common use cases:**
>
> * Find the document someone is asking for
> * List recent files in a project folder

***

## Manage access

> [accordion] Share file
>
> Shares a file with one person.
>
> **Tool name:** `@Share Google Drive File`
>
> **Input fields:**
>
> * `file_url` (required) - the file's link.
> * `user` (required) - who gets access, as a Ravenna user ID or an email. People outside your organization work too.
> * `role` (required) - `reader`, `commenter`, or `writer`.
> * `send_notification` - Google emails the person. Defaults to `true`.
>
> **Common use cases:**
>
> * Grant access to a team document on request
>
> **Example rule:**
>
> When someone asks for access to a team document, find it with @Search Google Drive Files using the document name, confirm the right file with the requester, then run @Share Google Drive File for them with role reader.
>
> When someone asks for access to a team document, find it with
> @Search Google Drive Files using the document name, confirm the right
> file with the requester, then run @Share Google Drive File for them
> with role reader.

> [accordion] Unshare file
>
> Removes one person's direct access to a file. Access inherited from a shared folder and the owner's access stay in place.
>
> **Tool name:** `@Unshare Google Drive File`
>
> **Input fields:**
>
> * `file_url` (required) - the file's link.
> * `user` (required) - whose access is removed, as a Ravenna user ID or an email.
>
> **Common use cases:**
>
> * Remove access someone no longer needs

***

## Setup

**1. Connect a service account**

Follow the [Google Drive setup guide](https://docs.ravenna.ai/integrations/google-drive/setup.md).

**2. Check the agent's tools**

Open your agent's settings and confirm the Google Drive tools appear under **Tools**. A disconnected integration shows a warning instead.

**3. Write a rule**

Reference the tools with @ mentions in a rule (Natural language instructions defining agent behavior), then test it on a real access request.

***

## Best practices

* **Search before sharing.** Have the agent find the file and confirm it with the requester before sharing.
* **Share the least access.** Default to `reader` unless the request needs more.
* **Gate sharing.** Put `@Share Google Drive File` behind **Confirm first** or **Requires approval** for sensitive folders.

Learn more about [configuring agents](https://docs.ravenna.ai/documentation/agents/overview.md#the-agent-page) and [Google Drive workflow actions](https://docs.ravenna.ai/integrations/google-drive/workflows.md)


## Related topics

- [Agent tools](https://docs.ravenna.ai/integrations/omnissa/agent-tools.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.