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 |
|---|
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 ( |
| Fields | |
|---|---|
categories[] |
Optional. One or more categories to filter font families (e.g., "serif", "sans-serif", "handwriting"). |
languages[] |
Optional. Language tags in BCP47 format to filter fonts that support specific scripts (e.g., "en_Latn", "zh_Hans"). |
platform |
Required. The platform in which the font family is going to be used. |
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 |
Optional. Contextual help text or error descriptions if the query failed. |
fontFamilies[] |
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: ❌