Skip to content

Commit 2ed4a03

Browse files
Copilothustcc
andauthored
Update MCP return description to clarify content vs spec usage (#275)
* Initial plan * Update MCP return description text to clarify content and spec usage Co-authored-by: hustcc <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: hustcc <[email protected]>
1 parent 4e1236e commit 2ed4a03

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

__tests__/server.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe("MCP Server", () => {
6060

6161
expect(res._meta).toEqual({
6262
description:
63-
"This is the chart's spec and configuration, which can be renderred to corresponding chart by AntV GPT-Vis chart components.",
63+
"The content returned by MCP is the remote image URL of the visualization chart, which can be rendered using Markdown or HTML image tags. The _meta.spec content corresponds to the chart's configuration and spec, which can be rendered using AntV GPT-Vis chart components.",
6464
spec: spec,
6565
});
6666

@@ -103,7 +103,7 @@ describe("MCP Server", () => {
103103

104104
expect(res._meta).toEqual({
105105
description:
106-
"This is the chart's spec and configuration, which can be renderred to corresponding chart by AntV GPT-Vis chart components.",
106+
"The content returned by MCP is the remote image URL of the visualization chart, which can be rendered using Markdown or HTML image tags. The _meta.spec content corresponds to the chart's configuration and spec, which can be rendered using AntV GPT-Vis chart components.",
107107
spec: spec,
108108
});
109109

@@ -150,7 +150,7 @@ describe("MCP Server", () => {
150150

151151
expect(res._meta).toEqual({
152152
description:
153-
"This is the chart's spec and configuration, which can be renderred to corresponding chart by AntV GPT-Vis chart components.",
153+
"The content returned by MCP is the remote image URL of the visualization chart, which can be rendered using Markdown or HTML image tags. The _meta.spec content corresponds to the chart's configuration and spec, which can be rendered using AntV GPT-Vis chart components.",
154154
spec: spec,
155155
});
156156

src/utils/callTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export async function callTool(tool: string, args: object = {}) {
102102
],
103103
_meta: {
104104
description:
105-
"This is the chart's spec and configuration, which can be renderred to corresponding chart by AntV GPT-Vis chart components.",
105+
"The content returned by MCP is the remote image URL of the visualization chart, which can be rendered using Markdown or HTML image tags. The _meta.spec content corresponds to the chart's configuration and spec, which can be rendered using AntV GPT-Vis chart components.",
106106
spec: { type: chartType, ...args },
107107
},
108108
};

0 commit comments

Comments
 (0)