UNPKG

mcp-planes-server

Version:

Plane API client and server

777 lines (776 loc) 21.9 kB
export const listProjectsSchema = { name: "list_projects", description: "List all projects", inputSchema: { type: "object", properties: {}, }, }; export const getProjectSchema = { name: "get_project", description: "Get a specific project by ID", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, keyword: { type: "string", description: "The keyword of the project", }, identifier: { type: "string", description: "The identifier of the project", }, }, }, }; export const createProjectSchema = { name: "create_project", description: "Create a new project", inputSchema: { type: "object", properties: { keyword: { type: "string", description: "The keyword of the project", }, name: { type: "string", description: "Project name", }, description: { type: "string", description: "Project description", }, identifier: { type: "string", description: "Project identifier (optional)", // 有长度限制,最多5个字符 maxLength: 5, }, }, required: ["name"], }, }; export const updateProjectSchema = { name: "update_project", description: "Update an existing project", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project to update", }, keyword: { type: "string", description: "The keyword of the project", }, name: { type: "string", description: "New project name", }, description: { type: "string", description: "New project description", }, identifier: { type: "string", description: "New project identifier", }, }, required: ["projectId"], }, }; export const deleteProjectSchema = { name: "delete_project", description: "Delete a project", inputSchema: { type: "object", properties: { keyword: { type: "string", description: "The keyword of the project", }, projectId: { type: "string", description: "The ID of the project to delete", }, }, required: ["projectId"], }, }; export const listIssuesSchema = { name: "list_issues", description: "List all issues in a project", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, }, required: ["projectId"], }, }; export const getIssueSchema = { name: "get_issue", description: "Get a specific issue by ID", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, issueId: { type: "string", description: "The ID of the issue", }, sequenceId: { type: "string", description: "The sequence ID of the issue", }, }, required: ["projectId"], }, }; export const createIssueSchema = { name: "create_issue", description: "Create a new issue", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, name: { type: "string", description: "Issue name/title", }, description_html: { type: "string", description: "HTML description of the issue", }, description_stripped: { type: "string", description: "Stripped version of the html description auto generated using the application.", }, estimate_points: { type: "number", description: "Total estimate points for the issue takes value between (0,7)", }, parent: { type: "string", description: "The project which the issue is part of auto generated from backend", }, start_date: { type: "string", description: "Start date of the issue", }, target_date: { type: "string", description: "Target date of the issue", }, priority: { type: "string", description: "Issue priority", enum: ["urgent", "high", "medium", "low", "none"], }, state: { type: "string", description: "Issue state", }, assignees: { type: "array", items: { type: "string", }, description: "List of assignee IDs", }, labels: { type: "array", items: { type: "string", }, description: "List of label IDs", }, }, required: ["projectId", "name", "description_html"], }, }; export const getIssueBySequenceIDSchema = { name: "get_issue_by_sequence_id", description: "Get a specific issue by sequence ID", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, sequence_id: { type: "string", description: "The sequence ID of the issue", }, }, required: ["projectId", "sequence_id"], }, }; export const updateIssueSchema = { name: "update_issue", description: "Update an existing issue", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, issueId: { type: "string", description: "The ID of the issue to update", }, name: { type: "string", description: "New issue name/title", }, description: { type: "string", description: "New issue description", }, priority: { type: "string", description: "New issue priority", enum: ["urgent", "high", "medium", "low", "none"], }, state: { type: "string", description: "New issue state", }, assignees: { type: "array", items: { type: "string", }, description: "New list of assignee IDs", }, labels: { type: "array", items: { type: "string", }, description: "New list of label IDs", }, }, required: ["projectId", "issueId"], }, }; export const deleteIssueSchema = { name: "delete_issue", description: "Delete an issue", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, issueId: { type: "string", description: "The ID of the issue to delete", }, }, required: ["projectId", "issueId"], }, }; export const listLabelsSchema = { name: "list_labels", description: "List all labels in a project", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, }, required: ["projectId"], }, }; export const createLabelSchema = { name: "create_label", description: "Create a new label", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, name: { type: "string", description: "Label name", }, color: { type: "string", description: "Label color in hex format (e.g., #FF0000)", }, }, required: ["projectId", "name", "color"], }, }; export const updateLabelSchema = { name: "update_label", description: "Update an existing label", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, labelId: { type: "string", description: "The ID of the label to update", }, name: { type: "string", description: "New label name", }, color: { type: "string", description: "New label color in hex format (e.g., #FF0000)", }, }, required: ["projectId", "labelId"], }, }; export const deleteLabelSchema = { name: "delete_label", description: "Delete a label", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, labelId: { type: "string", description: "The ID of the label to delete", }, }, required: ["projectId", "labelId"], }, }; export const listCommentsSchema = { name: "list_comments", description: "List all comments in an issue", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, issueId: { type: "string", description: "The ID of the issue", }, keyword: { type: "string", description: "The keyword to search for", }, }, required: ["projectId"], }, }; export const createCommentSchema = { name: "create_comment", description: "Create a new comment", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, issueId: { type: "string", description: "The ID of the issue", }, text: { type: "string", description: "Comment text", }, }, required: ["projectId", "issueId", "text"], }, }; export const updateCommentSchema = { name: "update_comment", description: "Update an existing comment", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, issueId: { type: "string", description: "The ID of the issue", }, commentId: { type: "string", description: "The ID of the comment to update", }, text: { type: "string", description: "New comment text", }, }, required: ["projectId", "issueId", "commentId", "text"], }, }; export const deleteCommentSchema = { name: "delete_comment", description: "Delete a comment", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, issueId: { type: "string", description: "The ID of the issue", }, commentId: { type: "string", description: "The ID of the comment to delete", }, }, required: ["projectId", "issueId", "commentId"], }, }; export const listStatesSchema = { name: "list_states", description: "List all states in a project", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, }, required: ["projectId"], }, }; export const createStateSchema = { name: "create_state", description: "Create a new state", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, name: { type: "string", description: "State name", }, group: { type: "string", description: "State group", enum: ["backlog", "unstarted", "started", "completed", "cancelled"], }, color: { type: "string", description: "State color in hex format (e.g., #FF0000)", }, }, required: ["projectId", "name", "group", "color"], }, }; export const updateStateSchema = { name: "update_state", description: "Update an existing state", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, stateId: { type: "string", description: "The ID of the state to update", }, name: { type: "string", description: "New state name", }, group: { type: "string", description: "New state group", enum: ["backlog", "unstarted", "started", "completed", "cancelled"], }, color: { type: "string", description: "New state color in hex format (e.g., #FF0000)", }, }, required: ["projectId", "stateId"], }, }; export const deleteStateSchema = { name: "delete_state", description: "Delete a state", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, stateId: { type: "string", description: "The ID of the state to delete", }, }, required: ["projectId", "stateId"], }, }; export const listMembersSchema = { name: "list_members", description: "List all members in a project", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, }, required: ["projectId"], }, }; export const getMemberSchema = { name: "get_member", description: "Get a specific member by ID", inputSchema: { type: "object", }, outputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, memberId: { type: "string", description: "The ID of the member", }, }, }, }; // cycle operations export const listCyclesSchema = { name: "list_cycles", description: "List all cycles in a project", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, }, required: ["projectId"], }, }; export const getCycleSchema = { name: "get_cycle", description: "Get a specific cycle by ID", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, cycleId: { type: "string", description: "The ID of the cycle", }, }, required: ["projectId", "cycleId"], }, }; export const createCycleSchema = { name: "create_cycle", description: "Create a new cycle", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, name: { type: "string", description: "Cycle name", }, startDate: { type: "string", description: "Cycle start date", }, endDate: { type: "string", description: "Cycle end date", }, description: { type: "string", description: "Cycle description", }, ownedBy: { type: "string", description: "Cycle owned by", }, }, required: ["projectId", "name", "startDate", "endDate"], }, }; export const updateCycleSchema = { name: "update_cycle", description: "Update an existing cycle", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, cycleId: { type: "string", description: "The ID of the cycle to update", }, name: { type: "string", description: "Cycle name", }, startDate: { type: "string", description: "Cycle start date", }, endDate: { type: "string", description: "Cycle end date", }, description: { type: "string", description: "Cycle description", }, ownedBy: { type: "string", description: "Cycle owned by", }, }, required: ["projectId", "cycleId"], }, }; export const deleteCycleSchema = { name: "delete_cycle", description: "Delete a cycle", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, cycleId: { type: "string", description: "The ID of the cycle to delete", }, }, required: ["projectId", "cycleId"], }, }; export const createMemberSchema = { name: "create_member", description: "Create a new member", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, name: { type: "string", description: "Member name", }, email: { type: "string", description: "Member email", }, }, required: ["projectId", "name", "email"], }, }; export const updateMemberSchema = { name: "update_member", description: "Update an existing member", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, memberId: { type: "string", description: "The ID of the member to update", }, name: { type: "string", description: "Member name", }, email: { type: "string", description: "Member email", }, }, required: ["projectId", "memberId"], }, }; export const deleteMemberSchema = { name: "delete_member", description: "Delete a member", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project", }, memberId: { type: "string", description: "The ID of the member to delete", }, }, required: ["projectId", "memberId"], }, };