Skip to content

Conversation

@rakdutta
Copy link
Collaborator

This pull request closes issue #1442 and introduces a richer, structured tag system across the entire MCP Context Forge application. Previously, tags were stored and handled as plain strings. They are now represented as objects/dictionaries containing both an id and a label, enabling future extensibility and more consistent filtering and display.

Database migration and model changes:

  • Added Alembic migration 9e028ecf59c4_tag_records_changes_list_str_to_list_ to convert all tags columns in key tables from lists of strings to lists of dicts with id and label fields, and provides a downgrade path to revert the change.
  • Updated all relevant Pydantic models in mcpgateway/schemas.py (ToolRead, ResourceRead, PromptRead, GatewayRead, ServerRead, A2AAgentRead, GrpcServiceRead) so their tags field is now a list of dictionaries instead of a list of strings. [1] [2] [3] [4] [5] [6] [7]

Backend logic updates:

  • Updated tag filtering logic in mcpgateway/services/export_service.py to match by tag id when tags are dictionaries, ensuring consistent filtering regardless of tag format.
  • Modified resource conversion and tool creation logic to handle the new tag format, normalizing tags to human-readable labels where needed. [1] [2] [3]

Frontend and template updates:

  • Updated all admin panel JavaScript functions in mcpgateway/static/admin.js to correctly display and edit tags, showing tag labels (or ids) when tags are objects and maintaining compatibility with string tags. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated templates in mcpgateway/templates/admin.html to display tag ids when tags are dictionaries, ensuring consistent rendering in the UI. [1] [2]

Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
@rakdutta rakdutta force-pushed the feature_update-tool-tag-structure branch from 05f67a1 to caa3a72 Compare November 28, 2025 08:39
@rakdutta rakdutta marked this pull request as ready for review November 28, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants