Skip to content

Feature/mcp tools selection improvement#6

Merged
mikewoo merged 16 commits into
mainfrom
feature/mcp-tools-selection-improvement
May 25, 2026
Merged

Feature/mcp tools selection improvement#6
mikewoo merged 16 commits into
mainfrom
feature/mcp-tools-selection-improvement

Conversation

@mikewoo

@mikewoo mikewoo commented May 25, 2026

Copy link
Copy Markdown
Owner

Change Type

  • Bug fix (fix)
  • New feature (feat)
  • Documentation (docs)
  • Chore (chore)
  • Refactoring (refactor)

Description

MCP Tools Selection in Agent Edit Dialog

Replaced the flat tool checklist in the Agent edit dialog with a new MCP Tools tab that groups tools by server with rich context:

  • New API: GET /api/v1/mcp-servers/tools — batch-returns all servers with their tools, including online status, inputSchema, and server metadata
  • Server context: Each server header shows name, online/offline badge, tool count, and optional description
  • Tool details: Expandable parameter schema preview for each tool (required/optional params, types, descriptions)
  • Offline awareness: Tools belonging to offline servers are disabled with a visual indicator
  • Mockup alignment: Param format display, button labels, and visual separators match the approved design mockup

MCP Server description Field

Added an optional description field to MCP Server across the entire stack:

Layer Changes
Database Flyway V7 idempotent migration + deploy/sql/init_eify_mysql.sql
Backend Entity, Create/Update/Response DTOs, Service, Controller
Frontend API McpServerCreateRequest, McpServerUpdateRequest, McpServerResponse, McpServerToolsResponse
Frontend UI Add/edit form (textarea, 500 char limit), table, card, and detail views
i18n en-US.json + zh-CN.json placeholder text

Bug Fixes

  • MCP Tools tab text invisible: Element Plus .el-checkbox-group { font-size: 0; line-height: 0 } cascaded into custom elements inside the group, zeroing out all text rendering. Fixed by explicitly declaring font-size and line-height on .tool-group, .tool-group-header, .tool-item,
    .tool-desc, .tool-params, and .param-row.
  • Form label asterisk separated from text: el-form-item__label defaults to display: inline-flex; justify-content: flex-end, which treats the ::before asterisk and the label text as independent flex items — causing them to spread apart like space-between. Fixed by overriding to display: block; text-align: right, keeping the asterisk and text as a single inline flow.

Version Bump

  • Backend pom.xml: 1.0.1-SNAPSHOT1.0.2-SNAPSHOT
  • Frontend package.json + package-lock.json: 1.0.1-SNAPSHOT1.0.2-SNAPSHOT

Testing

  • mvn test passes locally
  • npx vue-tsc --noEmit type check passes
  • npx vitest run passes
  • Core functionality manually verified (add/edit MCP Server with description, Agent MCP Tools tab with server grouping, online/offline state, param preview expand/collapse)
  • New features have test coverage (McpServerServiceTest.listToolsByWorkspace, controller integration tests for /tools endpoint)

Checklist

  • Database indexes: description is a display-only column not used in WHERE / JOIN clauses — no index needed. Flyway migration uses INFORMATION_SCHEMA check for idempotency.
  • Workspace isolation: /api/v1/mcp-servers/tools delegates to listToolsByWorkspace, which filters by WorkspaceContext.getWorkspaceId(). All existing CRUD operations already enforce workspace scoping.
  • Error handling: All new code paths use ErrorCode enum via BusinessException. No RuntimeException or raw-string errors.
  • Log format: No logging changes. Existing JSON/UTC logging unchanged.
  • Config security: No new configuration keys, no hardcoded passwords or API keys.
  • XSS protection: No new v-html usage. All dynamic content rendered via Vue template bindings.

Related Issue

N/A

Screenshots

mikewoo and others added 16 commits May 25, 2026 14:28
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…e status

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add card-like border and border-radius around each server group
- Clean up group header with bg-surface background and bottom border
- Tool items separated by subtle dividers
- Description text fills available space with flex: 1
- Remove nonexistent CSS variable, use explicit 12px
- Adjust params panel margins to fit within card container

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…tors

- Parameter rows: add colon after name, parentheses around required/optional, em-dash before description (query: string (必填) — 描述)
- Expand button: show 展开 ▾ / 收起 ▴ with arrow indicators
- Server header: add vertical pipe separators between endpoint and tool count

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add hardcoded fallbacks to all `var(--eify-*)` color references in
tool-group-header, tool-item, tool-desc, server-name, param-name,
param-desc, and related elements. Also fix form label asterisk
alignment with explicit text-align: right and line-height.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat: add description field to MCP Server and fix Agent edit dialog UI issues

- Add description column to mcp_server table via Flyway V7 migration
- Add description field to entity, DTOs, service, and controller
- Add description input to McpServerList add/edit form and views
- Show server description in Agent edit MCP Tools tab
- Fix MCP Tools tab text invisible (el-checkbox-group font-size:0 cascade)
- Fix form label asterisk separated from label text (flex→block layout)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@
fix: add missing description column to mcp_server in deploy init.sql

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@
chore: bump version to 1.0.2-SNAPSHOT

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@
chore: sync package-lock.json version to 1.0.2-SNAPSHOT

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@
@mikewoo mikewoo self-assigned this May 25, 2026
@mikewoo
mikewoo merged commit 8a128b3 into main May 25, 2026
0 of 2 checks passed
@mikewoo
mikewoo deleted the feature/mcp-tools-selection-improvement branch May 25, 2026 10:26
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.

1 participant