get_projects
Retrieve all projects from TickTick through the MCP server, enabling organized task management and streamlined project tracking for enhanced productivity.
Instructions
Get all projects from TickTick
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:259-268 (handler)MCP server tool handler for 'get_projects': calls TickTickClient.getProjects() and returns JSON-formatted response.case 'get_projects': const projects = await this.ticktickClient!.getProjects(); return { content: [ { type: 'text', text: JSON.stringify(projects, null, 2), }, ], };
- src/index.ts:82-89 (schema)Tool schema and metadata registration in ListTools response: empty input schema.{ name: 'get_projects', description: 'Get all projects from TickTick', inputSchema: { type: 'object', properties: {}, }, },
- src/ticktick-client.ts:288-297 (handler)Core implementation of getProjects in TickTickClient: authenticates and fetches projects via API /project endpoint.async getProjects(): Promise<TickTickProject[]> { await this.ensureAuthenticated(); try { const response = await this.client.get('/project'); return response.data || []; } catch (error) { throw new Error(`Failed to get projects: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
- src/types.ts:47-73 (schema)Zod schema definition for TickTickProject type returned by getProjects.export const TickTickProjectSchema = z.object({ id: z.string(), name: z.string(), color: z.string().optional(), inAll: z.boolean().optional(), sortOrder: z.number().optional(), sortType: z.string().optional(), userCount: z.number().optional(), etag: z.string().optional(), modifiedTime: z.string().optional(), closed: z.boolean().optional(), muted: z.boolean().optional(), transferred: z.boolean().optional(), groupId: z.string().optional(), viewMode: z.string().optional(), notificationOptions: z.object({ beMentioned: z.boolean().optional(), newTaskAssignedToMe: z.boolean().optional(), newTaskCreated: z.boolean().optional(), taskCompleted: z.boolean().optional(), taskDeleted: z.boolean().optional(), taskUpdated: z.boolean().optional() }).optional(), teamId: z.string().optional(), permission: z.string().optional(), kind: z.string().optional() });