Get Projects
get_projectsRetrieve projects from your personal knowledge base with optional filters by status (active, planned, completed) and technology.
Instructions
Get projects (active, planned, or completed)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_projects"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by project status | |
| tech | No | Filter by technology used |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes |
Implementation Reference
- api/mcp.ts:121-121 (registration)Registration of the 'get_projects' tool using server.registerTool with the name 'get_projects'.
"get_projects", - api/mcp.ts:122-129 (schema)Input/output schema for get_projects: optional 'status' enum filter (active/planned/completed) and optional 'tech' string filter, with textContentOutputSchema for output.
{ title: "Get Projects", description: "Get projects (active, planned, or completed)", inputSchema: { status: z.enum(["active", "planned", "completed"]).optional().describe("Filter by project status"), tech: z.string().optional().describe("Filter by technology used"), }, outputSchema: textContentOutputSchema, - api/mcp.ts:131-155 (handler)Handler function for get_projects. Reads projects from JSON files (active.json, planned.json, completed.json), optionally filters by status and technology, and returns the results as JSON text.
async ({ status, tech }) => { const files: Record<string, string> = { active: "projects/active.json", planned: "projects/planned.json", completed: "projects/completed.json", }; let allProjects: ProjectResult[] = []; const statusesToCheck = status ? [status] : ["active", "planned", "completed"]; for (const s of statusesToCheck) { try { const data = await readJsonFile<ProjectsData>(files[s]); const projects = data.projects.map(p => ({ ...p, status: s })); allProjects.push(...projects); } catch { // File may not exist } } if (tech) { const techLower = tech.toLowerCase(); allProjects = allProjects.filter(p => p.technologies.some(t => t.toLowerCase().includes(techLower))); } return { content: [{ type: "text", text: JSON.stringify(allProjects, null, 2) }] }; } - src/types.ts:41-61 (schema)Type definitions: Project (the base project shape), ProjectsData (wrapper with projects array), and ProjectResult (extends Project with added status field).
export interface Project { name: string; description: string; technologies: string[]; repo_url?: string; type?: string; monetization_strategy?: string; status?: string; problem?: string; solution?: string; target_audience?: string; mission_statement?: string; } export interface ProjectsData { projects: Project[]; } export interface ProjectResult extends Project { status: string; } - api/mcp.ts:40-43 (helper)Helper function readJsonFile<T> used by the handler to fetch and parse JSON data files from GitHub.
async function readJsonFile<T>(relativePath: string): Promise<T> { const content = await fetchFromGitHub(relativePath); return JSON.parse(content) as T; }