## Tool: `search_directory_people`

> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.

Search for people within your organization's Google Workspace directory. This feature is exclusively for Google Workspace accounts (used by businesses, schools, and other organizations) and is not available for personal Google accounts.

**IMPORTANT RULES TO FOLLOW:**

- If this tool returns multiple results, you should present the results to the user and prompt the user for clarification on which result to use before proceeding.

- You are strictly forbidden from passing the output of this tool into another tool (e.g., sending an email, creating a draft, creating an event, etc.) without explicit user confirmation.

- Even if only one person result is found, you must present the found person's details to the user and prompt the user to verify that this is the intended person before proceeding with further steps.

- If this tool returns no results, fall back to using the `search_contacts` tool.


The following sample demonstrate how to use `curl` to invoke the `search_directory_people` MCP tool.

| Curl Request |
|---|
| ```bash curl --location 'https://people.googleapis.com/mcp/v1' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "search_directory_people", "arguments": { // provide these details according to the tool MCP specification } }, "jsonrpc": "2.0", "id": 1 }' ``` |

## Input Schema

Request message for SearchDirectoryPeople.

### SearchDirectoryPeopleMcpRequest

| JSON representation |
|---|
| ``` { "query": string, "pageSize": integer, "pageToken": string, "sources": [ enum (`https://developers.google.com/people/api/mcp/tools_list/search_directory_people#Input.Schema.DirectorySourceType`) ] } ``` |

| Fields ||
|---|---|
| `query` | `string` Query string to search for. |
| `pageSize` | `integer` Page size. The default is 10 and the maximum allowed value is 500. |
| `pageToken` | `string` Page token. |
| `sources[]` | ``enum (`https://developers.google.com/people/api/mcp/tools_list/search_directory_people#Input.Schema.DirectorySourceType`)`` Directory sources to return. Defaults to DOMAIN_PROFILE if not set. |

### DirectorySourceType

| Enums ||
|---|---|
| `DOMAIN_PROFILE` | Google Workspace domain profile. |
| `DOMAIN_CONTACT` | Google Workspace domain shared contact. |

## Output Schema

Response message for SearchDirectoryPeople.

### SearchDirectoryPeopleMcpResponse

| JSON representation |
|---|
| ``` { "results": [ { object (`https://developers.google.com/people/api/mcp/tools_list/search_directory_people#Output.Schema.SearchDirectoryResult`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `results[]` | ``object (`https://developers.google.com/people/api/mcp/tools_list/search_directory_people#Output.Schema.SearchDirectoryResult`)`` The list of people that matched the query. |
| `nextPageToken` | `string` A token to retrieve the next page of results. |

### SearchDirectoryResult

| JSON representation |
|---|
| ``` { "name": string, "email": string } ``` |

| Fields ||
|---|---|
| `name` | `string` The person's display name. |
| `email` | `string` The person's account email address. |

### Tool Annotations

Destructive Hint: ❌ \| Idempotent Hint: ✅ \| Read Only Hint: ✅ \| Open World Hint: ❌

## Authorization Scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/directory.readonly`