create_project
Create a new project in Dida365 task management with customizable name, color, view mode, type, and sort order to organize tasks or notes effectively.
Instructions
Create a new project in Dida365. Requires at least a project name. Can specify color, view mode, kind and sort order. Returns the created project details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the new project (required) | |
| color | No | Hex color code for the project (e.g., "#F18181") | |
| sortOrder | No | Numerical sort order value (default 0) | |
| viewMode | No | View mode: "list", "kanban", or "timeline" | |
| kind | No | Project type: "TASK" or "NOTE" |
Implementation Reference
- src/index.ts:458-477 (handler)Implements the create_project tool by constructing a Project object from input arguments (name required, optional color, sortOrder, viewMode, kind) and posting it to the Dida365 API /project endpoint. Returns the API response as formatted text content.case "create_project": { const project: Project = { name: args.name as string, ...(args.color ? {color: args.color as string} : {}), ...(args.sortOrder ? {sortOrder: args.sortOrder as number} : 0), ...(args.viewMode ? {viewMode: args.viewMode as string} : {}), ...(args.kind ? {kind: args.kind as string} : {}), }; const response: AxiosResponse = await dida365Api.post("/project", project); return { content: [ { type: "text", text: `项目创建成功: ${JSON.stringify(response.data, null, 2)}`, }, ], }; }
- src/index.ts:263-292 (schema)Defines the tool metadata including name, description, and input schema for create_project, specifying required 'name' and optional properties like color, sortOrder, viewMode, kind.{ name: "create_project", description: "Create a new project in Dida365. Requires at least a project name. Can specify color, view mode, kind and sort order. Returns the created project details.", inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the new project (required)", }, color: { type: "string", description: 'Hex color code for the project (e.g., "#F18181")', }, sortOrder:{ type:"integer", description:"Numerical sort order value (default 0)" }, viewMode:{ type:"string", description:'View mode: "list", "kanban", or "timeline"' }, kind:{ type:"string", description:'Project type: "TASK" or "NOTE"' } }, required: ["name"], }, },
- src/index.ts:66-79 (schema)TypeScript interface defining the structure of a Project object, used in the create_project handler for type safety.interface Project { id?: string; name?: string; color?: string; sortOrder?: number; viewMode? : string; kind? :string; closed?:boolean; groupId?: string; permission?:string; }