Skip to content

feat: add tabbed interface with About and Tools tabs to server detail page#306

Merged
peppescg merged 1 commit intomainfrom
issues/284
Feb 12, 2026
Merged

feat: add tabbed interface with About and Tools tabs to server detail page#306
peppescg merged 1 commit intomainfrom
issues/284

Conversation

@peppescg
Copy link
Collaborator

Added tools definition in the detail page

Kapture.2026-02-11.at.19.17.52.mp4

… page

Introduce a tabbed layout on the catalog detail page with an About tab
(existing server info) and a Tools tab (table listing MCP tool definitions
extracted from server metadata). Add Zod schema validation for parsing
_meta publisher-provided metadata, uniform 48px row heights across both
tables, and OSV server fixture for MSW mocking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@peppescg peppescg self-assigned this Feb 11, 2026
Copilot AI review requested due to automatic review settings February 11, 2026 18:42
@peppescg peppescg linked an issue Feb 11, 2026 that may be closed by this pull request
@github-actions github-actions bot added the size/M Medium PR: 300-599 lines changed label Feb 11, 2026
@peppescg
Copy link
Collaborator Author

@claude succinct review

@claude
Copy link

claude bot commented Feb 11, 2026

Claude finished @peppescg's task in 57s —— View job


Code Review

  • Read changed files and understand implementation
  • Review code quality and adherence to guidelines
  • Provide succinct feedback

Review Summary

Overall: Clean implementation with good adherence to project guidelines. A few minor suggestions for improvement.

Strengths:

  • ✅ Proper TypeScript strict typing throughout (no any types)
  • ✅ Client/Server component boundaries correctly applied ('use client' only where needed)
  • ✅ Comprehensive test coverage for new components
  • ✅ Zod schema validation for runtime safety
  • ✅ Good UI patterns (empty states, sticky headers, responsive design)
  • ✅ Follows existing project conventions

Suggestions:

  1. src/lib/utils.ts:31 - Consider deduplicating tools if multiple transports provide the same tool:

    return Object.values(result.data).flatMap((t) => t.tool_definitions ?? []);
    // Could become:
    const allTools = Object.values(result.data).flatMap((t) => t.tool_definitions ?? []);
    return Array.from(new Map(allTools.map(tool => [tool.name, tool])).values());
  2. src/app/catalog/[repoName]/[serverName]/[version]/components/server-tools-table.tsx:33 - Magic value max-h-[70vh] could be a CSS variable or constant for consistency.

  3. Test coverage - Consider adding tests for:

    • getTools() and isVirtualMCPServer() edge cases (malformed metadata, missing fields)
    • Empty/null server objects

No blocking issues - ready to merge after considering the suggestions.


Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a tabbed interface to the server detail page, enabling users to view both server information and available MCP tools. It introduces runtime validation using Zod to safely parse server metadata, extracts tool definitions from publisher-provided metadata, and displays them in a dedicated "Tools" tab.

Changes:

  • Adds "About" and "Tools" tabs to the server detail page using a new ServerDetailTabs component
  • Introduces Zod schemas for validating and parsing server metadata from the MCP registry
  • Creates utility functions getTools() to extract tool definitions and refactors isVirtualMCPServer() to use the new schema-based parsing
  • Adds comprehensive tests for the new tab component and utility functions
  • Updates mock data to include an example server with tool definitions

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/lib/schemas/server-meta.ts New Zod schemas for validating server metadata structure and tool definitions
src/lib/utils.ts Refactored isVirtualMCPServer() and added getTools() to use schema-based parsing
src/lib/utils.test.ts Updated tests to use structured test data and added tests for getTools()
src/app/catalog/[repoName]/[serverName]/[version]/page.tsx Integrated tab component and extracted tools from server data
src/app/catalog/[repoName]/[serverName]/[version]/components/server-detail-tabs.tsx New tabbed interface component for About/Tools tabs
src/app/catalog/[repoName]/[serverName]/[version]/components/server-tools-table.tsx New table component for displaying MCP tools with empty state
src/app/catalog/[repoName]/[serverName]/[version]/components/tests/server-detail-tabs.test.tsx Comprehensive tests for tab switching and tool display
src/app/catalog/components/servers-table.tsx Adjusted padding for visual consistency across tables
src/mocks/fixtures/registry_v0_1_servers/get.ts Added OSV server with tool definitions for testing
package.json, pnpm-lock.yaml Added Zod v4 dependency
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@peppescg peppescg enabled auto-merge (squash) February 12, 2026 10:11
Copy link

@samuv samuv left a comment

Choose a reason for hiding this comment

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

⚙️

@peppescg peppescg merged commit 5f04e45 into main Feb 12, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium PR: 300-599 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] View tools name and description

2 participants