Skip to content

fix: update MCP server configuration text to include STREAMABLE_HTTP support #3088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025

Conversation

shaohuzhang1
Copy link
Contributor

fix: update MCP server configuration text to include STREAMABLE_HTTP support --bug=1056115 --user=刘瑞斌 【应用编排】编辑mcp节点的config后,提问会报错 https://www.tapd.cn/57709429/s/1699333 --bug=1056092 --user=刘瑞斌 【应用编排】MCP的支持文案要加上支持 Streamable HTTP https://www.tapd.cn/57709429/s/1699357

…support

--bug=1056115 --user=刘瑞斌 【应用编排】编辑mcp节点的config后,提问会报错 https://www.tapd.cn/57709429/s/1699333
--bug=1056092 --user=刘瑞斌 【应用编排】MCP的支持文案要加上支持 Streamable HTTP https://www.tapd.cn/57709429/s/1699357
getToolsSuccess: 'Get Tools Successfully',
getTool: 'Get Tools',
tool: 'Tool',
toolParam: 'Tool Params',
mcpServerTip: 'Please enter the JSON format of the MCP server config',
mcpToolTip: 'Please select a tool',
configLabel: 'MCP Server Config (Only supports SSE call method)'
configLabel: 'MCP Server Config (Only supports SSE/STREAMABLE_HTTP call method)'
},
imageGenerateNode: {
label: 'Image Generation',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There appear to be a few small issues in the provided code:

  1. The configLabel key and its value have been updated from "MCP Server Config" to "MCP Server Config (Only supports SSE/STREAMABLE_HTTP call method)".

However, this change does not match previous versions mentioned (getTool, toolParam, etc.). It might be worth aligning all the keys with their respective values for consistency.

  1. There is an extra comma after a closing bracket at line -47.

The lines of text within each node should follow proper formatting without unnecessary commas. For example, under mcpNode, there is a double comma between "label": "MCP Server" and "text": ....

  1. All labels ("label") need to end with quotes (":").

While these minor corrections will not affect functionality, they improve readability and maintainability of the code.

Here's the revised version with these adjustments implemented:

@@ -223,14 +223,14 @@ export default {
 },
 mcpNode: {
   label: 'MCP Server',
   text: 'Call MCP Tools through SSE/STREAMABLE_HTTP',
   getToolsSuccess: 'Get Tools Successfully',
   getTool: 'Get Tools',
   tool: 'Tool',
   toolParam: 'Tool Params',
   mcpServerTip: 'Please enter the JSON format of the MCP server config',
   mcpToolTip: 'Please select a tool',
   configLabel: 'MCP Server Config (only supports SSE/STREAMABLE_HTTP call method)'
 },
 imageGenerateNode: {
   label: 'Image Generation'
 }

These changes ensure that all elements are properly formatted according to JavaScript object notation standards.

getToolsSuccess: '获取工具成功',
getTool: '获取工具',
tool: '工具',
toolParam: '工具参数',
mcpServerTip: '请输入JSON格式的MCP服务器配置',
mcpToolTip: '请选择工具',
configLabel: 'MCP Server Config (仅支持SSE调用方式)'
configLabel: 'MCP Server Config (仅支持SSE/STREAMABLE_HTTP调用方式)'
},
imageGenerateNode: {
label: '图片生成',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided code snippet seems to be incomplete and has some potential inconsistencies. Here are the main points that I found:

  1. Variable Name Consistency: Ensure consistency in naming conventions. In Vue.js (which is used based on the context of the given code), component properties should be consistently prefixed with mcpNode and followed by camelCase instead of using underscores.

  2. Configuration Label Change:

  • configLabel: "MCP Server Config (仅支持SSE调用方式)",
  • configLabel: "MCP Server Config (仅支持SSE/STREAMABLE_HTTP调用方式)"
This change introduces a new configuration option called `streamableHttp`. Ensure any logic or UI adjustments are made to reflect this change.

3. **Text Updates**:
Update texts accordingly to match their purpose:
```diff
-  text: "通过SSE方式执行MCP服务中的工具",
+  text: "通过SSE与流式HTTP方式执行MCP服务中的工具"
  1. Missing Components: There might be missing components related to the tools' functionality, such as buttons, input fields for parameters, and displays for the results under mcpNode.tools.

These changes will help ensure that the functionality stays consistent while meeting user expectations better based on the update. Make sure all parts connected to these updated options are also adjusted appropriately. Additionally, consider adding error handling for cases where unsupported methods are chosen or if configurations fail gracefully.

getToolsSuccess: '獲取工具成功',
getTool: '獲取工具',
tool: '工具',
toolParam: '工具變數',
mcpServerTip: '請輸入JSON格式的MCP服務器配置',
mcpToolTip: '請選擇工具',
configLabel: 'MCP Server Config (僅支持SSE調用方式)'
configLabel: 'MCP Server Config (僅支持SSE/STREAMABLE_HTTP調用方式)'
},
imageGenerateNode: {
label: '圖片生成',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your code snippet has a couple of issues that I'll address:

Issues:

  1. Duplicate Texts:

    • The mcpServerTip and configLabel texts are repeated but with slightly different wording ("(僅支持SSE 調用方式)" vs "(僅支持SSE/STREAMABLE_HTTP調用方式)"). Ensure consistency.
  2. Typographical Errors:

    • In some strings, there is an extra space, e.g., "透過 SSE方式".

Suggestions for Optimization/Rewriting:

  • Consistent Wording: Remove the duplicate texts to avoid confusion.
  • Clarity Improvement: Ensure clarity in variable names and labels where necessary.

Here is the revised version of your code:

export default {
  nodeTypeMap: { // assuming this was intended for mappings or enums
    mspNode: {},
    mcqNode: {},
    mtpcNode: {}
  },
  
  mcpNode: {
    label: 'MCP 調用',
    text:
      '透過SSE和HTTP流式传输的方式執行MCP服務中的工具。',
    getToolsSuccess: '獲取工具成功',
    getTool: '獲取工具',
    tool: '工具',
    toolParam: '工具變數',
    mcpServerTip: '請輸入一個格式為 JSON 的 MCP服務器配置', // Simplified and improved wording
    mcpToolTip: '請選擇要使用的工具',
    configLabel: 'MCP Server Configuration (僅支持SSE HTTP流式传输调用方式)' 
  },
  imageGenerateNode: {
    label: '圖片生成'
  }
};

This change ensures consistent formatting, reduces redundancy, and clarifies the intentions behind various configuration messages and tool selection prompts.

Copy link

f2c-ci-robot bot commented May 15, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

f2c-ci-robot bot commented May 15, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@liuruibin liuruibin merged commit c12988b into main May 15, 2025
4 checks passed
@liuruibin liuruibin deleted the pr@main@fix_mcp_tips branch May 15, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants