fix: docs

This commit is contained in:
2026-03-18 13:02:50 +08:00
parent 4f9d295bd5
commit 8213092bb6
3 changed files with 609 additions and 170 deletions
-105
View File
@@ -90,111 +90,6 @@ async function mcpServeAction(host: string, options: MCPOptions) {
server.setRequestHandler(ListToolsRequestSchema, async () => {
return {
tools: [
{
name: 'generate_card_deck',
description: '生成 TTRPG 卡牌组内容,包括 Markdown 介绍文件、CSV 数据文件和 md-deck 组件配置(一站式快捷工具)',
inputSchema: {
type: 'object',
properties: {
deck_name: {
type: 'string',
description: '卡牌组名称,将用于生成文件名',
},
output_dir: {
type: 'string',
description: '输出目录路径(相对路径相对于 MCP 服务器工作目录)',
},
card_count: {
type: 'number',
description: '卡牌数量',
default: 10,
},
card_template: {
type: 'object',
description: '卡牌模板定义',
properties: {
fields: {
type: 'array',
description: '卡牌字段列表',
items: {
type: 'object',
properties: {
name: {
type: 'string',
description: '字段名称(英文,用于 CSV 列名)',
},
description: {
type: 'string',
description: '字段描述',
},
examples: {
type: 'array',
description: '示例值列表',
items: { type: 'string' },
},
},
required: ['name'],
},
},
examples: {
type: 'array',
description: '完整的卡牌示例数据',
items: {
type: 'object',
additionalProperties: { type: 'string' },
},
},
},
required: ['fields'],
},
deck_config: {
type: 'object',
description: 'md-deck 组件配置',
properties: {
size: {
type: 'string',
description: '卡牌尺寸,格式 "宽 x 高"(单位 mm',
default: '54x86',
},
grid: {
type: 'string',
description: '网格布局,格式 "列 x 行"',
default: '5x8',
},
bleed: {
type: 'number',
description: '出血边距(mm',
default: 1,
},
padding: {
type: 'number',
description: '内边距(mm',
default: 2,
},
shape: {
type: 'string',
description: '卡牌形状',
enum: ['rectangle', 'circle', 'hex', 'diamond'],
default: 'rectangle',
},
layers: {
type: 'string',
description: '正面图层配置,格式 "字段:行,列范围,字体大小"',
},
back_layers: {
type: 'string',
description: '背面图层配置',
},
},
},
description: {
type: 'string',
description: '卡牌组的介绍描述(可选)',
},
},
required: ['deck_name', 'output_dir'],
},
},
{
name: 'deck_frontmatter_read',
description: '读取 CSV 文件的 frontmatter(包含模板定义和 deck 配置)',