list-profiles
Retrieve and display available profile-based configurations for MCP server environments, enabling efficient setup and management of application settings and installations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/profile-tools.ts:13-35 (registration)Registers the 'list-profiles' tool with empty input schema. The handler fetches all profiles and active profile ID from configService, augments profiles with isActive flag, and returns as formatted JSON text content.server.tool( "list-profiles", {}, async (_, extra) => { const profiles = configService.getProfiles(); const activeProfileId = configService.getActiveProfileId(); return { content: [ { type: "text", text: JSON.stringify({ profiles: profiles.map(profile => ({ ...profile, isActive: profile.id === activeProfileId })), activeProfileId }, null, 2) } ] }; } );
- src/tools/profile-tools.ts:16-35 (handler)Handler function for list-profiles tool: retrieves profiles, marks active one, returns JSON.async (_, extra) => { const profiles = configService.getProfiles(); const activeProfileId = configService.getActiveProfileId(); return { content: [ { type: "text", text: JSON.stringify({ profiles: profiles.map(profile => ({ ...profile, isActive: profile.id === activeProfileId })), activeProfileId }, null, 2) } ] }; } );
- src/server.ts:32-32 (registration)Top-level call to registerProfileTools, which includes the list-profiles tool registration.registerProfileTools(server, configService);