list_tasks
Retrieve and display tasks from Zoho Projects, allowing users to view project or portal-level task lists with pagination controls.
Instructions
List tasks from a project or portal
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Project ID (optional for portal-level) | |
| page | No | Page number | |
| per_page | No | Items per page |
Implementation Reference
- src/index.ts:706-718 (handler)The handler function that implements the core logic for the 'list_tasks' tool. It builds the Zoho Projects API endpoint depending on whether a project ID is provided (project-specific or portal-wide tasks) and fetches the data using the shared makeRequest method, returning formatted JSON.private async listTasks( projectId?: string, page: number = 1, perPage: number = 10 ) { const endpoint = projectId ? `/portal/${this.config.portalId}/projects/${projectId}/tasks?page=${page}&per_page=${perPage}` : `/portal/${this.config.portalId}/tasks?page=${page}&per_page=${perPage}`; const data = await this.makeRequest(endpoint); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }], }; }
- src/index.ts:285-303 (schema)The tool schema definition including name, description, and input schema for parameters (project_id optional, pagination). This is returned by the ListTools handler.{ name: "list_tasks", description: "List tasks from a project or portal", inputSchema: { type: "object", properties: { project_id: { type: "string", description: "Project ID (optional for portal-level)", }, page: { type: "number", description: "Page number", default: 1 }, per_page: { type: "number", description: "Items per page", default: 10, }, }, }, },
- src/index.ts:572-573 (registration)Registration/dispatch point in the CallToolRequestSchema switch statement that routes calls to the listTasks handler.case "list_tasks": return await this.listTasks(params.project_id, params.page, params.per_page);
- src/http-server.ts:709-721 (handler)Identical handler function in the HTTP server implementation for the 'list_tasks' tool.private async listTasks( projectId?: string, page: number = 1, perPage: number = 10 ) { const endpoint = projectId ? `/portal/${this.config.portalId}/projects/${projectId}/tasks?page=${page}&per_page=${perPage}` : `/portal/${this.config.portalId}/tasks?page=${page}&per_page=${perPage}`; const data = await this.makeRequest(endpoint); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }], }; }
- src/http-server.ts:288-306 (schema)Identical tool schema in the HTTP server version.{ name: "list_tasks", description: "List tasks from a project or portal", inputSchema: { type: "object", properties: { project_id: { type: "string", description: "Project ID (optional for portal-level)", }, page: { type: "number", description: "Page number", default: 1 }, per_page: { type: "number", description: "Items per page", default: 10, }, }, }, },