5.5-c Delete and destructive tools (phase 2)
- Dominant language
- JavaScript
- Stars
- 400
- Forks
- 89
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 146
Description
**Parent:** #7674 (5.5 Pipelines (DevOps))
**Tool file:** new `forge/ee/lib/mcp/tools/pipelines.js`
`destructiveHint: true`. Kept separate from ordinary writes so MCP clients gate them behind confirmation by default. One tool per endpoint; no consolidation.
| Tool | Endpoint | Scope | Annotation |
|---|---|---|---|
| `platform_delete_pipeline` | `DELETE /pipelines/:pipelineId` | `pipeline:delete` | destructive |
| `platform_delete_pipeline_stage` | `DELETE /pipelines/:pipelineId/stages/:stageId` | `pipeline:delete` | destructive |
**Design notes:**
- Both deletes share the `pipeline:delete` scope; stage delete removes only the named stage, pipeline delete removes the pipeline and all its stages.
**Tool definitions (description + zod inputSchema):**
```js
platform_delete_pipeline: {
description: 'Delete a pipeline. Cascades to remove all of the pipeline stages.',
inputSchema: z.object({ pipelineId: z.string().describe('Pipeline hashid to delete') })
}
platform_delete_pipeline_stage: {
description: 'Delete a single stage from a pipeline, leaving the rest of the pipeline intact.',
inputSchema: z.object({
pipelineId: z.string().describe('Pipeline hashid the stage belongs to'),
stageId: z.string().describe('Pipeline stage hashid to delete')
})
}
```
**Tests:**
- Every tool here carries `destructiveHint: true`.
- Read-only PAT is rejected for both deletes.
---
Contributor guide
Research direction
Implement the two tools in forge/ee/lib/mcp/tools/pipelines.js, using the listed endpoint, scope, descriptions, and zod input schemas as the starting point. Run the relevant MCP tests and verify both tools carry destructiveHint: true and reject a read-only PAT. Done means both delete endpoints are exposed separately, with pipeline deletion cascading to its stages and stage deletion leaving the rest intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100