Document Tools
生成可打印的2026年PDF日历,支持双月、季度、半年、全年单页布局和多种设计风格
用三种语言从你的代码中调用此工具。
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/pdf-2026-calendar-designer' \
-H 'Content-Type: application/json' \
-d '{"filename":"customHolidaysFile.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/zh/api/tools/pdf-2026-calendar-designer' \
-F 'title=2026 Business Planning Calendar' \
-F 'subtitle=Quarterly single-page layout with highlighted milestones' \
-F 'layout=quarterly' \
-F 'orientation=landscape' \
-F 'theme=vivid' \
-F 'pageSize=A4' \
-F 'weekStart=monday' \
-F 'showHolidays=true' \
-F 'holidayPreset=cn' \
-F 'showHolidayNames=true' \
-F 'customHolidaysJson=[{"date":"2026-03-12","name":"Product Launch","short":"PL"}]
or
{"2026-03-12":"Product Launch"}' \
-F 'customHolidaysFile=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
-F 'marginMm=6'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/pdf-2026-calendar-designer| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| title | text | 是 | — |
| subtitle | text | 否 | — |
| layout | select | 否 | — |
| orientation | select | 否 | — |
| theme | select | 否 | — |
| pageSize | select | 否 | — |
| weekStart | select | 否 | — |
| showHolidays | checkbox | 否 | — |
| holidayPreset | select | 否 | — |
| showHolidayNames | checkbox | 否 | — |
| customHolidaysJson | textarea | 否 | Optional custom holiday list in JSON. Supports array objects or date->name map. Only 2026 dates are used. |
| customHolidaysFile | file需先上传 | 否 | — |
| marginMm | number | 否 | — |
文件结果
{
"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 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-pdf-2026-calendar-designer": {
"name": "pdf-2026-calendar-designer",
"description": "生成可打印的2026年PDF日历,支持双月、季度、半年、全年单页布局和多种设计风格",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-2026-calendar-designer",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}连接到 SSE 端点后,列出已开放的工具:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}通过工具 id 调用,参数由其参数表构建:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pdf-2026-calendar-designer",
"arguments": {
"title": "2026 Business Planning Calendar",
"subtitle": "Quarterly single-page layout with highlighted milestones",
"layout": "quarterly",
"orientation": "landscape",
"theme": "vivid",
"pageSize": "A4",
"weekStart": "monday",
"showHolidays": true,
"holidayPreset": "cn",
"showHolidayNames": true,
"customHolidaysJson": "[{\"date\":\"2026-03-12\",\"name\":\"Product Launch\",\"short\":\"PL\"}]\nor\n{\"2026-03-12\":\"Product Launch\"}",
"customHolidaysFile": "https://example.com/file.ext",
"marginMm": 6
}
}
}有问题或反馈?请联系 [email protected]