Format Conversion
生成发票或报价单,自动计算总价/税额并支持嵌入 Logo
用三种语言从你的代码中调用此工具。
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/xlsx-invoice-generator' \
-F 'file=@/path/to/logoFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/zh/api/tools/xlsx-invoice-generator' \
-F 'documentType=invoice' \
-F 'title=Tax Invoice' \
-F 'companyInfoJson={
"name": "Elysia Labs Ltd.",
"address": "88 Innovation Road, Shanghai",
"taxId": "CN-91440000-2026",
"phone": "+86-21-8888-6666",
"email": "[email protected]"
}' \
-F 'customerInfoJson={
"name": "Nova Commerce",
"address": "120 Market Street, Shenzhen",
"email": "[email protected]"
}' \
-F 'lineItemsJson=[
{
"description": "Implementation Service",
"quantity": 3,
"unitPrice": 1200,
"taxRate": 13
},
{
"description": "Support Package",
"quantity": 2,
"unitPrice": 600
}
]' \
-F 'defaultTaxRate=13' \
-F 'invoiceNumber=INV-2026-031' \
-F 'issueDate=2026-03-06' \
-F 'dueDate=2026-03-20' \
-F 'currencySymbol=$' \
-F 'logoFile=/public/samples/images/logo.png' \
-F 'notes=Thank you for your business.'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/xlsx-invoice-generator| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| documentType | select | 否 | — |
| title | text | 否 | — |
| companyInfoJson | textarea | 是 | — |
| customerInfoJson | textarea | 是 | — |
| lineItemsJson | textarea | 是 | — |
| defaultTaxRate | number | 否 | — |
| invoiceNumber | text | 否 | — |
| issueDate | date | 否 | — |
| dueDate | date | 否 | — |
| currencySymbol | text | 否 | — |
| logoFile | file需先上传 | 否 | — |
| notes | textarea | 否 | — |
文件结果
{
"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-xlsx-invoice-generator": {
"name": "xlsx-invoice-generator",
"description": "生成发票或报价单,自动计算总价/税额并支持嵌入 Logo",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-invoice-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": "xlsx-invoice-generator",
"arguments": {
"documentType": "invoice",
"title": "Tax Invoice",
"companyInfoJson": "{\n \"name\": \"Elysia Labs Ltd.\",\n \"address\": \"88 Innovation Road, Shanghai\",\n \"taxId\": \"CN-91440000-2026\",\n \"phone\": \"+86-21-8888-6666\",\n \"email\": \"[email protected]\"\n}",
"customerInfoJson": "{\n \"name\": \"Nova Commerce\",\n \"address\": \"120 Market Street, Shenzhen\",\n \"email\": \"[email protected]\"\n}",
"lineItemsJson": "[\n {\n \"description\": \"Implementation Service\",\n \"quantity\": 3,\n \"unitPrice\": 1200,\n \"taxRate\": 13\n },\n {\n \"description\": \"Support Package\",\n \"quantity\": 2,\n \"unitPrice\": 600\n }\n]",
"defaultTaxRate": 13,
"invoiceNumber": "INV-2026-031",
"issueDate": "2026-03-06",
"dueDate": "2026-03-20",
"currencySymbol": "$",
"logoFile": "/public/samples/images/logo.png",
"notes": "Thank you for your business."
}
}
}有问题或反馈?请联系 [email protected]