read_project
Retrieve detailed project information and task statuses using the project ID from the taskqueue-mcp server.
Instructions
Read all information for a given project, by its ID, including its tasks' statuses.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | The ID of the project to read (e.g., proj-1). |
Implementation Reference
- src/server/toolExecutors.ts:309-322 (handler)MCP tool handler/executor for 'read_project'. Validates the projectId input parameter and delegates execution to TaskManager.readProject(projectId), returning the raw result data.const readProjectToolExecutor: ToolExecutor = { name: "read_project", async execute(taskManager, args) { // 1. Argument Validation const projectId = validateProjectId(args.projectId); // 2. Core Logic Execution const resultData = await taskManager.readProject(projectId); // 3. Return raw success data return resultData; }, }; toolExecutorMap.set(readProjectToolExecutor.name, readProjectToolExecutor);
- src/server/tools.ts:36-49 (schema)Tool schema definition for 'read_project', including name, description, and inputSchema requiring a 'projectId' string.const readProjectTool: Tool = { name: "read_project", description: "Read all information for a given project, by its ID, including its tasks' statuses.", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project to read (e.g., proj-1).", }, }, required: ["projectId"], }, };
- src/server/index.ts:29-33 (registration)MCP server registration for listing tools. Returns ALL_TOOLS array which includes the 'read_project' tool schema.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: ALL_TOOLS }; });
- src/server/TaskManager.ts:589-606 (helper)Core helper method implementing project reading logic. Finds the project by ID, returns structured data or throws if not found.public async readProject(projectId: string): Promise<ReadProjectSuccessData> { await this.ensureInitialized(); await this.reloadFromDisk(); const project = this.data.projects.find((p) => p.projectId === projectId); if (!project) { throw new AppError(`Project ${projectId} not found`, AppErrorCode.ProjectNotFound); } return { projectId: project.projectId, initialPrompt: project.initialPrompt, projectPlan: project.projectPlan, completed: project.completed, autoApprove: project.autoApprove, tasks: project.tasks, }; }
- src/server/index.ts:35-46 (registration)MCP server registration for calling tools. Dispatches to executeToolAndHandleErrors which uses toolExecutorMap to invoke the 'read_project' handler.server.setRequestHandler(CallToolRequestSchema, async (request) => { // Directly call the handler. It either returns a result object (success or isError:true) // OR it throws a tagged protocol error. return await executeToolAndHandleErrors( request.params.name, request.params.arguments || {}, taskManager ); // SDK automatically handles: // - Wrapping the returned value (success data or isError:true object) in `result: { ... }` // - Catching re-thrown protocol errors and formatting the top-level `error: { ... }` });