manage_projects
List and analyze indexed projects in the RAG MCP Server to manage semantic code search and knowledge graph relationships.
Instructions
Gérer et lister les projets indexés
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Action à effectuer | list |
| project_path | No | Chemin du projet pour les statistiques (requis pour 'stats') |
Implementation Reference
- src/tools/rag/manage-projects.ts:33-52 (handler)Main execution handler for the 'manage_projects' tool. Handles 'list' action to list all indexed projects using getProjects(), and 'stats' action to get statistics for a specific project using getProjectStatistics().export const manageProjectsHandler: ToolHandler = async (args) => { const action = args.action || "list"; try { if (action === "stats") { if (!args.project_path || typeof args.project_path !== 'string') { throw new Error("The 'project_path' parameter is required for 'stats' action"); } const stats = await getProjectStatistics(args.project_path); return { content: [{ type: "text", text: JSON.stringify(stats, null, 2) }] }; } else { const projects = await getProjects(); return { content: [{ type: "text", text: JSON.stringify(projects, null, 2) }] }; } } catch (error) { console.error("Error in manage_projects tool:", error); throw error; } };
- Tool definition including name, description, and input schema for 'manage_projects'. Defines parameters: action ('list' or 'stats'), and optional project_path for stats.export const manageProjectsTool: ToolDefinition = { name: "manage_projects", description: "Gérer et lister les projets indexés", inputSchema: { type: "object", properties: { action: { type: "string", description: "Action à effectuer", enum: ["list", "stats"], default: "list" }, project_path: { type: "string", description: "Chemin du projet pour les statistiques (requis pour 'stats')" } } }, };
- build/tools/rag/register-rag-tools.js:29-36 (registration)Explicit registration of the manage_projects tool and handler into the central toolRegistry.// Enregistrer manage_projects try { toolRegistry.register(manageProjectsTool, manageProjectsHandler); console.log(`✅ Outil enregistré: ${manageProjectsTool.name}`); } catch (error) { console.error(`❌ Erreur lors de l'enregistrement de ${manageProjectsTool.name}:`, error); }