Skip to main content
Glama

Unleash MCP (Feature Toggle)

get-project-features.ts1.63 kB
/** * Get project features tool for Unleash MCP Server */ import { z } from 'zod'; import { getProjectFeatures } from '../unleash/get-project-features.js'; /** * Schema for getProjectFeatures tool parameters */ export const GetProjectFeaturesParamsSchema = { projectId: z.string().min(1) }; /** * Handler for fetching project features */ export async function handleGetProjectFeatures(params: { projectId: string; }) { try { // Get the project features const features = await getProjectFeatures(params.projectId); if (!features) { return { content: [{ type: "text", text: JSON.stringify({ success: false, error: `Failed to fetch features for project '${params.projectId}'` }, null, 2) }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify({ success: true, message: `Successfully fetched features for project '${params.projectId}'`, features: features }, null, 2) }] }; } catch (error: any) { return { content: [{ type: "text", text: JSON.stringify({ success: false, error: error.message }, null, 2) }], isError: true }; } } /** * Tool definition for getProjectFeatures */ export const getProjectFeaturesTool = { name: "getProjectFeatures", description: "Get all features for a specific project from the Unleash repository", paramsSchema: GetProjectFeaturesParamsSchema, handler: handleGetProjectFeatures };

Implementation Reference

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cuongtl1992/unleash-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server