fix(mcp): sync workflow description to MCP server on update

When updating an MCP server configuration, the description was not
syncing from the updated workflow description unless explicitly cleared.

This fix ensures that when a user updates their workflow description
and then updates the MCP server, the MCP server description reflects
the current workflow description unless an explicit custom description
is provided.

Fixes #33626
This commit is contained in:
BillionClaw 2026-03-18 20:09:17 +08:00
parent 29c70736dc
commit 882a56e6b5
1 changed files with 4 additions and 4 deletions

View File

@ -102,11 +102,11 @@ class AppMCPServerController(Resource):
if not server:
raise NotFound()
description = payload.description
if description is None or not description:
server.description = app_model.description or ""
# Always sync description from app model unless explicitly provided
if payload.description:
server.description = payload.description
else:
server.description = description
server.description = app_model.description or ""
server.name = app_model.name