getProjects
Retrieve a comprehensive list of all projects integrated with the Unleash Feature Toggle system for efficient project management and oversight.
Instructions
Get a list of all projects
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/get-projects.ts:3-32 (handler)The handler function that implements the core logic of the 'getProjects' tool. It calls getAllProjects to fetch projects and formats the response as MCP content or an error.async function handleGetProjects() { try { const projects = await getAllProjects(); return { content: [ { type: 'text', text: JSON.stringify(projects, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: JSON.stringify( { success: false, error: error.message, }, null, 2 ), }, ], isError: true, }; } }
- src/tools/get-projects.ts:34-38 (schema)The tool definition object providing the name, description, and reference to the handler function. No input parameters schema is defined.export const getProjects = { name: 'getProjects', description: 'Get a list of all projects', handler: handleGetProjects, };
- src/server.ts:171-175 (registration)Registration of the 'getProjects' tool on the MCP server instance using server.tool().server.tool( getProjects.name, getProjects.description, getProjects.handler as any );