get_project
Retrieve detailed project information by providing its unique three-letter uppercase identifier (e.g., 'CRD') within the coderide MCP server.
Instructions
Retrieves detailed information about a specific project using its unique 'slug' (three uppercase letters, e.g., 'CRD').
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The unique three-letter uppercase identifier for the project (e.g., 'CRD'). |
Implementation Reference
- src/tools/get-project.ts:98-132 (handler)The main handler function that executes the get_project tool. It validates input, makes an API call to retrieve project data using the slug, processes the response, and handles errors.* Execute the get-project tool */ async execute(input: GetProjectInput): Promise<unknown> { logger.info('Executing get-project tool', input); try { // Use the injected API client to get project by slug if (!this.apiClient) { throw new Error('API client not available - tool not properly initialized'); } const url = `/project/slug/${input.slug.toUpperCase()}`; logger.debug(`Making GET request to: ${url}`); const responseData = await this.apiClient.get<ProjectApiResponse>(url) as unknown as ProjectApiResponse; // Return project data according to the new schema return { slug: responseData?.slug || '', name: responseData?.name || '', description: responseData?.description || '', projectKnowledge: responseData?.projectKnowledge || {}, // Changed to camelCase projectDiagram: responseData?.projectDiagram || '', // Changed to camelCase projectStandards: responseData?.projectStandards || {} // Assuming project_standards is also camelCase from API }; } catch (error) { const errorMessage = (error instanceof Error) ? error.message : 'An unknown error occurred'; logger.error(`Error in get-project tool: ${errorMessage}`, error instanceof Error ? error : undefined); return { isError: true, content: [{ type: "text", text: errorMessage }] }; } }
- src/tools/get-project.ts:14-20 (schema)Zod schema defining the input validation for the get_project tool, requiring a three-letter project slug.const GetProjectSchema = z.object({ // Project slug (URL-friendly identifier) slug: z.string({ required_error: "Project slug is required" }) .regex(/^[A-Za-z]{3}$/, { message: "Project slug must be three letters (e.g., CRD or crd). Case insensitive." }), }).strict();
- src/index.ts:315-330 (registration)Tool instantiation and registration block in the production server setup. The GetProjectTool is created with dependency injection and registered via the BaseTool.register method.const tools: any[] = [ new StartProjectTool(secureApiClient), new GetPromptTool(secureApiClient), new GetTaskTool(secureApiClient), new GetProjectTool(secureApiClient), new UpdateTaskTool(secureApiClient), new UpdateProjectTool(secureApiClient), new ListProjectsTool(secureApiClient), new ListTasksTool(secureApiClient), new NextTaskTool(secureApiClient), ]; // Register each tool with the server tools.forEach(tool => { tool.register(server); });
- src/tools/get-project.ts:73-95 (helper)Helper method that generates agent instructions after executing the tool, providing guidance on next steps and context usage.protected generateAgentInstructions(input: GetProjectInput, result: any): AgentInstructions { return { immediateActions: [ "Analyze project_knowledge for architectural patterns and constraints", "Review project_diagram for system structure and relationships", "Understand project standards and coding conventions", "Establish this context as foundation for all subsequent task work" ], nextRecommendedTools: ["get_task", "list_tasks"], workflowPhase: 'context', contextRequired: ["project_knowledge", "project_diagram", "project_standards"], criticalReminders: [ "This context is essential for proper task interpretation", "Always reference project knowledge before starting any task", "Follow project standards and architectural patterns" ], automationHints: { contextEstablishment: "This tool provides the foundation for all project work", workflowGuidance: "Use get_task next to select specific task, or list_tasks to see all available tasks", knowledgeBase: "Project knowledge contains critical architectural decisions and patterns" } }; }