## Tool: `search_fonts`

Finds appropriate fonts matching categories and/or languages.

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

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

## Input Schema

Request message for the `FindFonts` method. Used to discover Google Fonts based on categories or supported languages.

### FindFontsRequest

| JSON representation |
|---|
| ``` { "categories": [ string ], "languages": [ string ], "platform": enum (`https://developers.google.com/design-mcp/reference/mcp/tools_list/search_fonts#Input.Schema.Platform`), "sort": enum (`https://developers.google.com/design-mcp/reference/mcp/tools_list/search_fonts#Input.Schema.Sort`) } ``` |

| Fields ||
|---|---|
| `categories[]` | `string` Optional. One or more categories to filter font families |
| `languages[]` | `string` Optional. Language tags in BCP47 format to filter fonts that support specific scripts (e.g., "en_Latn", "zh_Hans"). |
| `platform` | ``enum (`https://developers.google.com/design-mcp/reference/mcp/tools_list/search_fonts#Input.Schema.Platform`)`` Required. The platform in which the font family is going to be used. |
| `sort` | ``enum (`https://developers.google.com/design-mcp/reference/mcp/tools_list/search_fonts#Input.Schema.Sort`)`` Optional. The sort order for the returned font families. Defaults to POPULARITY_DESCENDING if unspecified. |

### Platform

Different types of platform contexts.

| Enums ||
|---|---|
| `PLATFORM_UNSPECIFIED` | Default value (not specifying usually defaults to web) |
| `PLATFORM_ANDROID` | Android platform |
| `PLATFORM_WEB` | Web platform |

### Sort

Enum to specify sorting criteria and order.

| Enums ||
|---|---|
| `SORT_UNSPECIFIED` | Unspecified sort order. Defaults to POPULARITY_DESCENDING. |
| `POPULARITY_DESCENDING` | Sort by popularity, most popular first. |
| `POPULARITY_ASCENDING` | Sort by popularity, least popular first. |
| `TRENDING_DESCENDING` | Sort by trending, most trending first. |
| `TRENDING_ASCENDING` | Sort by trending, least trending first. |
| `NAME_ASCENDING` | Sort by name, A-Z. |
| `NAME_DESCENDING` | Sort by name, Z-A. |
| `DATE_ADDED_ASCENDING` | Sort by date added, oldest first. |
| `DATE_ADDED_DESCENDING` | Sort by date added, newest first. |

## Output Schema

Response message for the `FindFonts` method. Contains a list of font family names.

### FindFontsResponse

| JSON representation |
|---|
| ``` { "errorHelp": string, "fontFamilies": [ string ] } ``` |

| Fields ||
|---|---|
| `errorHelp` | `string` Optional. Contextual help text or error descriptions if the query failed. |
| `fontFamilies[]` | `string` The names of font families that match the search criteria (e.g., "Roboto", "Open Sans"). |

### Tool Annotations

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