Data Visualization
从事件数据生成美观且交互式的时间轴,支持多种布局和样式
用三种语言从你的代码中调用此工具。
curl -X POST 'https://api.elysiatools.com/zh/api/tools/timeline-generator' \
-H 'Content-Type: application/json' \
-d '{"eventData":"JSON format:\n[{"title": "Project Launch", "date": "2024-01-15", "description": "Initial project release"},\n{"title": "Major Update", "date": "2024-06-20", "description": "Version 2.0 launch"},\n{"title": "Expansion", "date": "2024-12-01", "description": "International market entry"}]\n\nor text format:\nProject Launch|2024-01-15|Initial project release\nMajor Update|2024-06-20|Version 2.0 launch\nExpansion|2024-12-01|International market entry","timelineTitle":"输入时间轴标题...","timelineOrientation":"vertical","colorScheme":"default","dateFormat":"auto","pointSize":"12","lineWidth":"3","fontSize":"14","startYear":0,"endYear":0,"backgroundColor":"#ffffff","showDates":true,"showDescription":true,"showProgress":true}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/timeline-generator| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| eventData | textarea | 是 | 时间轴事件。支持JSON数组或简单的标题|日期|描述文本格式 |
| timelineTitle | text | 否 | 显示在时间轴上方的标题 |
| timelineOrientation | select | 否 | — |
| colorScheme | select | 否 | — |
| dateFormat | select | 否 | — |
| pointSize | number | 否 | 事件点的像素大小 |
| lineWidth | number | 否 | 时间轴线的像素宽度 |
| fontSize | number | 否 | 文本的基础字体像素大小 |
| startYear | number | 否 | 时间轴的开始年份(留空自动) |
| endYear | number | 否 | 时间轴的结束年份(留空自动) |
| backgroundColor | color | 否 | 时间轴容器的背景颜色 |
| showDates | checkbox | 否 | 在时间轴上显示事件日期 |
| showDescription | checkbox | 否 | 在时间轴上显示事件描述 |
| showProgress | checkbox | 否 | 显示表示时间轴进展的进度线 |
HTML 结果
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-timeline-generator": {
"name": "timeline-generator",
"description": "从事件数据生成美观且交互式的时间轴,支持多种布局和样式",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=timeline-generator",
"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": "timeline-generator",
"arguments": {
"eventData": "JSON format:\n[{"title": "Project Launch", "date": "2024-01-15", "description": "Initial project release"},\n{"title": "Major Update", "date": "2024-06-20", "description": "Version 2.0 launch"},\n{"title": "Expansion", "date": "2024-12-01", "description": "International market entry"}]\n\nor text format:\nProject Launch|2024-01-15|Initial project release\nMajor Update|2024-06-20|Version 2.0 launch\nExpansion|2024-12-01|International market entry",
"timelineTitle": "输入时间轴标题...",
"timelineOrientation": "vertical",
"colorScheme": "default",
"dateFormat": "auto",
"pointSize": "12",
"lineWidth": "3",
"fontSize": "14",
"startYear": 0,
"endYear": 0,
"backgroundColor": "#ffffff",
"showDates": true,
"showDescription": true,
"showProgress": true
}
}
}有问题或反馈?请联系 [email protected]