5.3-c Delete and destructive tools (phase 2)
- Dominant language
- JavaScript
- Stars
- 400
- Forks
- 89
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 146
Description
**Parent:** #7672 (5.3 Application management)
**Tool file:** `forge/ee/lib/mcp/tools/applications.js` (extend)
`destructiveHint: true`. Kept separate from ordinary writes so MCP clients gate them behind confirmation by default. Delete is one tool per endpoint.
| Tool | Endpoint | Scope | Annotation |
|---|---|---|---|
| `platform_delete_application` | `DELETE /applications/:applicationId` | `project:delete` | destructive |
**Design notes:**
- `DELETE /applications/:applicationId` returns 422 when the application still has instances. Surface as a descriptive "empty the application first" error.
**Tool definitions (description + zod inputSchema):**
```js
platform_delete_application: {
description: 'Delete an application. The application must have no instances first; deleting a non-empty application returns 422 (empty the application first).',
inputSchema: z.object({
applicationId: z.string().describe('Application id (opaque hashid) to delete')
})
}
```
**Tests:**
- Delete rejected for read-only PAT.
- Delete of a non-empty application returns the descriptive 422.
- `delete_application` carries `destructiveHint: true`.
---
Contributor guide
Research direction
Extend forge/ee/lib/mcp/tools/applications.js, starting by reading the existing application tool definitions and nearby tests. Add the delete tool with its opaque applicationId input, destructive annotation, read-only rejection, and descriptive error for non-empty applications; verify the three listed test cases.
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
- 76/100