list_requests
View and manage all active requests with task summaries in the MCP TaskManager system for streamlined task oversight.
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:491-495 (handler)The handler function that executes the core logic of the 'list_requests' tool by calling formatRequestsList() and returning the formatted list of requests.public async listRequests() { return { message: this.formatRequestsList(), }; }
- index.ts:66-66 (schema)Zod schema for validating input parameters of the 'list_requests' tool. It accepts an empty object since no parameters are required.const ListRequestsSchema = z.object({});
- index.ts:175-179 (registration)Registration of the 'list_requests' tool within the listTools() method's return array.{ name: "list_requests", description: "List all requests in the system.", inputSchema: ListRequestsSchema, },
- index.ts:254-260 (handler)Dispatch handler in callTool() method that validates input using the schema and invokes the listRequests() method.case "list_requests": { const parsed = ListRequestsSchema.safeParse(parameters); if (!parsed.success) { throw new Error(`Invalid parameters: ${parsed.error}`); } return this.listRequests(); }
- index.ts:310-321 (helper)Helper method used by listRequests() to format the list of requests into a markdown table.private formatRequestsList(): string { let output = "Requests:\n"; output += "| ID | Original Request | Tasks Done | Total Tasks |\n"; output += "|-----|-----------------|------------|-------------|\n"; for (const req of this.data.requests) { const doneTasks = req.tasks.filter((t) => t.approved).length; output += `| ${req.requestId} | ${req.originalRequest} | ${doneTasks} | ${req.tasks.length} |\n`; } return output; }