Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 35 additions & 17 deletions __tests__/charts/fishbone-diagram.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "generate_fishbone_diagram",
"description": "Generate a fishbone diagram chart to uses a fish skeleton, like structure to display the causes or effects of a core problem, with the problem as the fish head and the causes/effects as the fish bones. It suits problems that can be split into multiple related factors.",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"data": {
Expand All @@ -14,54 +13,73 @@
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"$ref": "#/properties/data/properties/children/items"
"type": "object",
"properties": {
"name": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"]
}
}
},
"required": ["name"]
}
}
},
"required": ["name"],
"type": "object"
"required": ["name"]
}
}
},
"required": ["name"],
"description": "Data for fishbone diagram chart, such as, { name: 'main topic', children: [{ name: 'topic 1', children: [{ name: 'subtopic 1-1' }] }."
"description": "Data for fishbone diagram chart which is a hierarchical structure, such as, { name: 'main topic', children: [{ name: 'topic 1', children: [{ name: 'subtopic 1-1' }] }] }, and the maximum depth is 3."
},
"style": {
"description": "Custom style configuration for the chart.",
"type": "object",
"properties": {
"texture": {
"default": "default",
"description": "Set the texture for the chart, optional, default is 'default'. 'rough' refers to hand-drawn style.",
"type": "string",
"enum": ["default", "rough"],
"type": "string"
"default": "default",
"description": "Set the texture for the chart, optional, default is 'default'. 'rough' refers to hand-drawn style."
}
},
"type": "object"
"description": "Custom style configuration for the chart."
},
"theme": {
"type": "string",
"default": "default",
"description": "Set the theme for the chart, optional, default is 'default'.",
"enum": ["default", "academy", "dark"],
"type": "string"
"enum": ["default", "academy", "dark"]
},
"width": {
"type": "number",
"description": "Set the width of chart, default is 600.",
"default": 600
"default": 600,
"description": "Set the width of chart, default is 600."
},
"height": {
"type": "number",
"description": "Set the height of chart, default is 400.",
"default": 400
"default": 400,
"description": "Set the height of chart, default is 400."
}
},
"required": ["data"]
"required": ["data"],
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
58 changes: 38 additions & 20 deletions __tests__/charts/mind-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "generate_mind_map",
"description": "Generate a mind map chart to organizes and presents information in a hierarchical structure with branches radiating from a central topic, such as, a diagram showing the relationship between a main topic and its subtopics.",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"data": {
Expand All @@ -14,24 +13,42 @@
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"children": {
"items": {
"$ref": "#/properties/data/properties/children/items"
},
"type": "array"
},
"name": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"]
}
}
},
"required": ["name"]
}
}
},
"required": ["name"],
"type": "object"
"required": ["name"]
}
}
},
"required": ["name"],
"description": "Data for mind map chart, such as, { name: 'main topic', children: [{ name: 'topic 1', children: [{ name:'subtopic 1-1' }] }."
"description": "Data for mind map chart which is a hierarchical structure, such as, { name: 'main topic', children: [{ name: 'topic 1', children: [{ name:'subtopic 1-1' }] }, and the maximum depth is 3."
},
"theme": {
"default": "default",
Expand All @@ -40,28 +57,29 @@
"type": "string"
},
"style": {
"description": "Custom style configuration for the chart.",
"type": "object",
"properties": {
"texture": {
"default": "default",
"description": "Set the texture for the chart, optional, default is 'default'. 'rough' refers to hand-drawn style.",
"type": "string",
"enum": ["default", "rough"],
"type": "string"
"default": "default",
"description": "Set the texture for the chart, optional, default is 'default'. 'rough' refers to hand-drawn style."
}
},
"type": "object"
"description": "Custom style configuration for the chart."
},
"width": {
"type": "number",
"description": "Set the width of chart, default is 600.",
"default": 600
"default": 600,
"description": "Set the width of chart, default is 600."
},
"height": {
"type": "number",
"description": "Set the height of chart, default is 400.",
"default": 400
"default": 400,
"description": "Set the height of chart, default is 400."
}
},
"required": ["data"]
"required": ["data"],
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
38 changes: 31 additions & 7 deletions __tests__/charts/organization-chart.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,31 @@
"children": {
"type": "array",
"items": {
"$ref": "#/properties/data/properties/children/items"
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": ["name"]
}
}
},
"required": ["name"]
}
}
},
Expand All @@ -36,7 +60,7 @@
}
},
"required": ["name"],
"description": "Data for organization chart, such as, { name: 'CEO', description: 'Chief Executive Officer', children: [{ name: 'CTO', description: 'Chief Technology Officer', children: [{ name: 'Dev Manager', description: 'Development Manager' }] }] }."
"description": "Data for organization chart which is a hierarchical structure, such as, { name: 'CEO', description: 'Chief Executive Officer', children: [{ name: 'CTO', description: 'Chief Technology Officer', children: [{ name: 'Dev Manager', description: 'Development Manager' }] }] }, and the maximum depth is 3."
},
"orient": {
"type": "string",
Expand All @@ -51,16 +75,16 @@
"description": "Set the theme for the chart, optional, default is 'default'."
},
"style": {
"description": "Custom style configuration for the chart.",
"type": "object",
"properties": {
"texture": {
"default": "default",
"description": "Set the texture for the chart, optional, default is 'default'. 'rough' refers to hand-drawn style.",
"type": "string",
"enum": ["default", "rough"],
"type": "string"
"default": "default",
"description": "Set the texture for the chart, optional, default is 'default'. 'rough' refers to hand-drawn style."
}
},
"type": "object"
"description": "Custom style configuration for the chart."
},
"width": {
"type": "number",
Expand Down
72 changes: 48 additions & 24 deletions __tests__/charts/treemap.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
"name": "generate_treemap_chart",
"description": "Generate a treemap chart to display hierarchical data and can intuitively show comparisons between items at the same level, such as, show disk space usage with treemap.",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"data": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
Expand All @@ -20,59 +18,85 @@
"children": {
"type": "array",
"items": {
"$ref": "#/properties/data/items"
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "number"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["name", "value"]
}
}
},
"required": ["name", "value"]
}
}
},
"required": ["name", "value"]
},
"description": "Data for treemap chart, such as, [{ name: 'Design', value: 70, children: [{ name: 'Tech', value: 20 }] }]."
},
"theme": {
"default": "default",
"description": "Set the theme for the chart, optional, default is 'default'.",
"enum": ["default", "academy", "dark"],
"type": "string"
"minItems": 1,
"description": "Data for treemap chart which is a hierarchical structure, such as, [{ name: 'Design', value: 70, children: [{ name: 'Tech', value: 20 }] }], and the maximum depth is 3."
},
"style": {
"description": "Custom style configuration for the chart.",
"type": "object",
"properties": {
"backgroundColor": {
"description": "Background color of the chart, such as, '#fff'.",
"type": "string"
"type": "string",
"description": "Background color of the chart, such as, '#fff'."
},
"palette": {
"description": "Color palette for the chart, it is a collection of colors.",
"type": "array",
"items": {
"type": "string"
},
"type": "array"
"description": "Color palette for the chart, it is a collection of colors."
},
"texture": {
"default": "default",
"description": "Set the texture for the chart, optional, default is 'default'. 'rough' refers to hand-drawn style.",
"type": "string",
"enum": ["default", "rough"],
"type": "string"
"default": "default",
"description": "Set the texture for the chart, optional, default is 'default'. 'rough' refers to hand-drawn style."
}
},
"type": "object"
"description": "Custom style configuration for the chart."
},
"theme": {
"type": "string",
"enum": ["default", "academy", "dark"],
"default": "default",
"description": "Set the theme for the chart, optional, default is 'default'."
},
"width": {
"type": "number",
"description": "Set the width of chart, default is 600.",
"default": 600
"default": 600,
"description": "Set the width of chart, default is 600."
},
"height": {
"type": "number",
"description": "Set the height of chart, default is 400.",
"default": 400
"default": 400,
"description": "Set the height of chart, default is 400."
},
"title": {
"type": "string",
"default": "",
"description": "Set the title of chart."
}
},
"required": ["data"]
"required": ["data"],
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@antv/mcp-server-chart",
"description": "A Model Context Protocol server for generating charts using AntV. This is a TypeScript-based MCP server that provides chart generation capabilities. It allows you to create various types of charts through MCP tools.",
"version": "0.8.1",
"version": "0.8.2",
"main": "build/index.js",
"types": "build/index.d.ts",
"exports": {
Expand Down
Loading