@liangshanli/mcp-server-project-standards 2.1.4 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liangshanli/mcp-server-project-standards",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "description": "MCP Project Standards server with project info, structure, API standards, development standards, API debugging, login authentication and configuration management tools",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
@@ -957,9 +957,9 @@ class ProjectStandardsMCPServer {
957
957
 
958
958
  result = await this[name](args || {});
959
959
 
960
- // Check if result has contentType (MCP embedded prompt format)
961
- if (result && result.contentType === "application/vnd.x-mcp-embedded-prompt") {
962
- // Return the result as-is for MCP embedded prompts
960
+ // Check if result has contentType (special format)
961
+ if (result && result.contentType === "text") {
962
+ // Return the result as-is for special text format
963
963
  return {
964
964
  jsonrpc: '2.0',
965
965
  id,
@@ -74,20 +74,31 @@ async function api_debug(params, config, saveConfig) {
74
74
  } catch (parseError) {
75
75
  // 无法解析为JSON,给出建议
76
76
  return {
77
- contentType: "application/vnd.x-mcp-embedded-prompt",
77
+ contentType: "text",
78
78
  content: [
79
79
  {
80
80
  type: "text",
81
- text: `Detected body starting with { but cannot be parsed as JSON object. Suggested approach:
82
-
83
- 1. Use api_config tool to add the API to the list
84
- 2. Use api_execute tool to execute the API by index
85
-
86
- Example:
87
- - Add API: api_config with action="addApi" and api={"url":"${url}","method":"${requestMethod}","body":"valid JSON object"}
88
- - Execute API: api_execute with index=<returned index>
89
-
90
- Parse error: ${parseError.message}`
81
+ text: "⚠️ IMPORTANT: You MUST use addApi to add the API to the list first! Use api_config tool.\n\n🔧 Step 1: Add API to Configuration (REQUIRED)\n\nCall: api_config with action=\"addApi\" and api={\"url\":\"${url}\",\"method\":\"${requestMethod}\",\"body\":\"your corrected JSON here\"}\n\n⚠️ REMINDER: You MUST use api_config with addApi to add the API to the list!"
82
+ },
83
+ {
84
+ type: "text",
85
+ text: "🔧 Step 2: Execute API by Index\n\nAfter adding the API, call: api_execute with index=<returned index>\n\nThis will execute the pre-configured API with the correct format."
86
+ },
87
+ {
88
+ type: "text",
89
+ text: "🚨 REMINDER: You MUST use addApi first!\n\n- Use api_config with action=\"addApi\" to add the API to the list\n- Then use api_execute with the returned index to execute"
90
+ },
91
+ {
92
+ type: "text",
93
+ text: "💡 IMPORTANT: Remember to use addApi!\n\n- First: api_config with action=\"addApi\" to add the API\n- Second: api_execute with index to run the API"
94
+ },
95
+ {
96
+ type: "text",
97
+ text: "📋 Final Reminder: Use addApi → Then api_execute\n\n1. First: api_config with action=\"addApi\"\n2. Then: api_execute with index=<number>\n\nThis is the ONLY way to handle invalid JSON requests."
98
+ },
99
+ {
100
+ type: "text",
101
+ text: "⚠️ ESSENTIAL: You MUST use addApi!\n\n- First: api_config with action=\"addApi\" to add the API\n- Second: api_execute with index to run the API"
91
102
  }
92
103
  ]
93
104
  };