list_requests
Retrieve a summary of all requests and their tasks within the MCP server for task management. Quickly access basic information and task overviews for efficient monitoring and organization.
Instructions
List all requests with their basic information and summary of tasks. This provides a quick overview of all requests in the system.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.ts:560-574 (handler)Core handler method in TaskManagerServer class that loads tasks, formats a summary table of all requests, and returns structured data including request summaries with task counts.public async listRequests() { await this.loadTasks(); const requestsList = this.formatRequestsList(); return { status: "requests_listed", message: `Current requests in the system:\n${requestsList}`, requests: this.data.requests.map((req) => ({ requestId: req.requestId, originalRequest: req.originalRequest, totalTasks: req.tasks.length, completedTasks: req.tasks.filter((t) => t.done).length, approvedTasks: req.tasks.filter((t) => t.approved).length, })), }; }
- index.ts:788-797 (handler)MCP tool call dispatcher for 'list_requests': validates input with schema and invokes the listRequests method on TaskManagerServer.case "list_requests": { const parsed = ListRequestsSchema.safeParse(args); if (!parsed.success) { throw new Error(`Invalid arguments: ${parsed.error}`); } const result = await taskManagerServer.listRequests(); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
- index.ts:75-75 (schema)Zod schema defining empty input object for the list_requests tool.const ListRequestsSchema = z.object({});
- index.ts:215-223 (registration)Tool object definition for 'list_requests' including name, description, and input schema, used for MCP tool listing.const LIST_REQUESTS_TOOL: Tool = { name: "list_requests", description: "List all requests with their basic information and summary of tasks. This provides a quick overview of all requests in the system.", inputSchema: { type: "object", properties: {}, }, };
- index.ts:683-696 (registration)Registers all tools including LIST_REQUESTS_TOOL in the MCP server's listTools response.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ REQUEST_PLANNING_TOOL, GET_NEXT_TASK_TOOL, MARK_TASK_DONE_TOOL, APPROVE_TASK_COMPLETION_TOOL, APPROVE_REQUEST_COMPLETION_TOOL, OPEN_TASK_DETAILS_TOOL, LIST_REQUESTS_TOOL, ADD_TASKS_TO_REQUEST_TOOL, UPDATE_TASK_TOOL, DELETE_TASK_TOOL, ], }));