Document Tools
Экспериментируйте с настройками типографики: межстрочный интервал, отступы, выравнивание
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/pdf-typography-playground' \
-H 'Content-Type: application/json' \
-d '{"content":"Typography is the art and technique of arranging type to make written language legible, readable, and appealing when displayed.\n\nThe arrangement of type involves selecting typefaces, point sizes, line lengths, line-spacing (leading), and letter-spacing (tracking), and adjusting the space between pairs of letters (kerning).\n\nGood typography creates a visual hierarchy that guides the reader through the content. It establishes tone and mood, enhances readability, and communicates the intended message effectively.","fontSize":12,"fontWeight":"normal","lineHeight":1.5,"paragraphSpacingBefore":0,"paragraphSpacingAfter":12,"textAlign":"left","firstLineIndent":0,"leftIndent":0,"rightIndent":0,"letterSpacing":0,"wordSpacing":0,"showBaseline":false,"showGrid":false,"showBorder":false,"showHeader":false,"headerText":"Document Header","headerAlignment":"center","showFooter":false,"footerText":"Page {page} of {total}","footerAlignment":"center"}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/pdf-typography-playground| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| content | textarea | Да | — |
| fontSize | number | Нет | — |
| fontWeight | select | Нет | — |
| lineHeight | number | Нет | — |
| paragraphSpacingBefore | number | Нет | — |
| paragraphSpacingAfter | number | Нет | — |
| textAlign | select | Нет | — |
| firstLineIndent | number | Нет | — |
| leftIndent | number | Нет | — |
| rightIndent | number | Нет | — |
| letterSpacing | number | Нет | — |
| wordSpacing | number | Нет | — |
| showBaseline | checkbox | Нет | — |
| showGrid | checkbox | Нет | — |
| showBorder | checkbox | Нет | — |
| showHeader | checkbox | Нет | — |
| headerText | text | Нет | — |
| headerAlignment | select | Нет | — |
| showFooter | checkbox | Нет | — |
| footerText | text | Нет | — |
| footerAlignment | select | Нет | — |
Файловый результат
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-pdf-typography-playground": {
"name": "pdf-typography-playground",
"description": "Экспериментируйте с настройками типографики: межстрочный интервал, отступы, выравнивание",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-typography-playground",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pdf-typography-playground",
"arguments": {
"content": "Typography is the art and technique of arranging type to make written language legible, readable, and appealing when displayed.\n\nThe arrangement of type involves selecting typefaces, point sizes, line lengths, line-spacing (leading), and letter-spacing (tracking), and adjusting the space between pairs of letters (kerning).\n\nGood typography creates a visual hierarchy that guides the reader through the content. It establishes tone and mood, enhances readability, and communicates the intended message effectively.",
"fontSize": 12,
"fontWeight": "normal",
"lineHeight": 1.5,
"paragraphSpacingBefore": 0,
"paragraphSpacingAfter": 12,
"textAlign": "left",
"firstLineIndent": 0,
"leftIndent": 0,
"rightIndent": 0,
"letterSpacing": 0,
"wordSpacing": 0,
"showBaseline": false,
"showGrid": false,
"showBorder": false,
"showHeader": false,
"headerText": "Document Header",
"headerAlignment": "center",
"showFooter": false,
"footerText": "Page {page} of {total}",
"footerAlignment": "center"
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]