list_requests
View all pending requests and their associated tasks in the MCP TaskManager system to monitor queue status and track progress.
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 main handler function for the 'list_requests' tool. It returns a formatted list of all requests using the helper formatRequestsList().public async listRequests() { return { message: this.formatRequestsList(), }; }
- index.ts:66-66 (schema)Zod input schema for the 'list_requests' tool. It is an empty object since the tool requires no parameters.const ListRequestsSchema = z.object({});
- index.ts:175-179 (registration)Registration of the 'list_requests' tool in the listTools() method's return array, specifying name, description, and input schema.{ name: "list_requests", description: "List all requests in the system.", inputSchema: ListRequestsSchema, },
- index.ts:310-321 (helper)Helper utility function that generates a markdown table listing all requests with their progress (tasks done/total). Called by listRequests().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; }
- index.ts:254-260 (helper)Dispatch case in callTool() method that validates input and invokes the listRequests() handler.case "list_requests": { const parsed = ListRequestsSchema.safeParse(parameters); if (!parsed.success) { throw new Error(`Invalid parameters: ${parsed.error}`); } return this.listRequests(); }