Design
端到端生成磨砂玻璃(glassmorphism)或新拟态(neumorphism)的完整 CSS 片段:调节模糊、饱和度、色调不透明度、圆角、边框、外阴影与顶部高光;可选 SVG feTurbulence 颗粒噪点叠加与 @supports 不支持降级;自动附带 -webkit-backdrop-filter 前缀(Safari 18 以下必需)与 Tailwind 类映射(含 v3/v4 差异提示),并在渐变背景上实时预览成品卡片。
用三种语言从你的代码中调用此工具。
curl -X POST 'http://127.0.0.1:3003/zh/api/tools/glassmorphism-css-snippet-builder' \
-H 'Content-Type: application/json' \
-d '{"style":"glass","blurPx":12,"saturatePct":160,"tintColor":"#ffffff","tintAlpha":0.15,"radiusPx":16,"borderWidth":1,"borderAlpha":0.25,"shadowAlpha":0.12,"topHighlight":true,"noiseOverlay":true,"includeFallback":true,"neuBgColor":"#e0e5ec","neuDistance":9,"neuPressed":false,"neuDark":false}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST http://127.0.0.1:3003/zh/api/tools/glassmorphism-css-snippet-builder| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| style | select | 否 | — |
| blurPx | number | 否 | — |
| saturatePct | number | 否 | — |
| tintColor | color | 否 | — |
| tintAlpha | number | 否 | — |
| radiusPx | number |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-glassmorphism-css-snippet-builder": {
"name": "glassmorphism-css-snippet-builder",
"description": "端到端生成磨砂玻璃(glassmorphism)或新拟态(neumorphism)的完整 CSS 片段:调节模糊、饱和度、色调不透明度、圆角、边框、外阴影与顶部高光;可选 SVG feTurbulence 颗粒噪点叠加与 @supports 不支持降级;自动附带 -webkit-backdrop-filter 前缀(Safari 18 以下必需)与 Tailwind 类映射(含 v3/v4 差异提示),并在渐变背景上实时预览成品卡片。",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=glassmorphism-css-snippet-builder",
"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": "glassmorphism-css-snippet-builder",
"arguments": {
"style": "glass",
"blurPx": 12,
"saturatePct": 160,
"tintColor": "#ffffff",
"tintAlpha": 0.15,
"radiusPx": 16,
"borderWidth": 1,
"borderAlpha": 0.25,
"shadowAlpha": 0.12,
"topHighlight": true,
"noiseOverlay": true,
"includeFallback": true,
"neuBgColor": "#e0e5ec",
"neuDistance": 9,
"neuPressed": false,
"neuDark": false
}
}
}有问题或反馈?请联系 [email protected]
| — |
| borderWidth | number | 否 | — |
| borderAlpha | number | 否 | — |
| shadowAlpha | number | 否 | — |
| topHighlight | checkbox | 否 | — |
| noiseOverlay | checkbox | 否 | — |
| includeFallback | checkbox | 否 | — |
| neuBgColor | color | 否 | — |
| neuDistance | number | 否 | — |
| neuPressed | checkbox | 否 | — |
| neuDark | checkbox | 否 | — |
HTML 结果
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}