get_project_context
Retrieve project context for AI assistants using the Model Context Protocol (MCP), enabling seamless integration with Buildable projects for task management and progress tracking.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/cli.ts:24-38 (handler)MCP server tool registration and handler for 'get_project_context'. Fetches project context using the BuildableMCPClient and returns it formatted as MCP content.this.server.tool('get_project_context', {}, async () => { if (!this.client) { throw new Error('Not connected to Buildable API'); } const context = await this.client.getProjectContext(); return { content: [ { type: 'text', text: JSON.stringify(context, null, 2), }, ], }; });
- src/client.ts:77-92 (helper)BuildableMCPClient method that performs the actual API request to retrieve the project context from the Buildable API.async getProjectContext(): Promise<ProjectContext> { this.log('debug', 'Fetching project context...'); try { const response = await this.makeRequest<ProjectContext>( 'GET', `/projects/${this.config.projectId}/context` ); this.log('info', 'Successfully retrieved project context'); return response.data!; } catch (error) { this.log('error', 'Failed to get project context:', error); throw error; } }
- src/types.ts:12-41 (schema)TypeScript interface defining the structure of the ProjectContext returned by the tool.export interface ProjectContext { project: { id: string; title: string; description: string; status: 'planning' | 'in_progress' | 'completed' | 'paused'; created_at: string; updated_at: string; }; plan: { overview: string; technology_stack: string[]; architecture: string; timeline: string; requirements: string[]; technical_specifications: string; }; tasks: { total: number; completed: number; in_progress: number; pending: number; summary: TaskSummary[]; }; context: { recent_activity: string[]; current_phase: string; next_priorities: string[]; }; }