delete_project
Remove specified projects from the CODING DevOps platform using the project ID, ensuring efficient project management and resource allocation.
Instructions
删除 CODING DevOps 中的指定项目
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | 要删除的项目ID |
Implementation Reference
- src/tools/project/delete.ts:7-24 (handler)The core handler function that executes the delete_project tool logic: initializes the CodingConnection, deletes the project by ID via API, and returns a success message.export async function deleteProject(args: DeleteProjectArgs, config: CodingDevOpsConfig) { CodingConnection.initialize(config); const connection = CodingConnection.getInstance(); await connection.deleteProject({ ProjectId: args.projectId }); return { content: [ { type: 'text', text: `Successfully deleted project with ID: ${args.projectId}`, }, ], }; }
- src/tools/project/index.ts:8-21 (schema)Input schema definition for the delete_project tool, specifying the required projectId parameter.{ name: 'delete_project', description: '删除 CODING DevOps 中的指定项目', inputSchema: { type: 'object', properties: { projectId: { type: 'string', description: '要删除的项目ID' } }, required: ['projectId'], } },
- src/index.ts:114-115 (registration)Main server dispatch/registration for delete_project tool, calling the project.deleteProject handler.case 'delete_project': result = await tools.project.deleteProject(request.params.arguments);
- src/tools/project/index.ts:87-93 (registration)Local registration of delete_project within projectTools module, exporting the handler wrapper and definitions.export const projectTools = { initialize: (config: CodingDevOpsConfig) => ({ listProjects: (args: ListProjectsArgs) => listProjects(args, config), createProject: (args: CreateProjectArgs) => createProject(args, config), deleteProject: (args: DeleteProjectArgs) => deleteProject(args, config), definitions, }),
- src/api/coding_connection.ts:347-366 (helper)Supporting API method in CodingConnection that performs the actual HTTP request to delete the project.public async deleteProject(params: { ProjectId: string; }): Promise<void> { const requestBody = { Action: 'DeleteOneProject', ProjectId: params.ProjectId }; await axios.post( `${CodingConnection.config.apiUrl}/?Action=DeleteOneProject`, requestBody, { headers: { 'Authorization': `token ${CodingConnection.config.token}`, 'Content-Type': 'application/json', 'Accept': 'application/json' } } ); }