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. |
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: ❌