Skip to content

MCP: add delete_workspace tool (CRUD parity with other entities) #101

Description

@victorsoriadrp

Context

The MCP server (archipulse mcp) currently exposes create_workspace but not delete_workspace. The other entities have full CRUD parity (create_elementdelete_element, create_relationshipdelete_relationship, create_diagramdelete_diagram), so workspace deletion is the only asymmetry.

Surfaced 2026-06-27 during demo video pre-flight — after creating a test workspace via MCP, had to switch to the UI to delete it before recording. AI agents working autonomously on architecture modeling cannot clean up after themselves without leaving the conversation.

Acceptance criteria

  • New MCP tool delete_workspace in internal/mcpserver/server.go, following the same pattern as delete_element
  • Takes workspace_id parameter (string)
  • Calls the existing DELETE /api/v1/workspaces/{id} endpoint via the internal HTTP client
  • Returns a structured success/error message
  • Respects existing RBAC — only succeeds if the calling user is the workspace owner (backend already enforces this)
  • Tool description follows the architect-friendly pattern: "delete_workspace — Permanently remove a workspace and all its elements, relationships, and diagrams. Owner-only."

Notes for first-time contributors

  • Look at the delete_element tool registration (around internal/mcpserver/server.go:385) — copy the structure
  • The HTTP DELETE call to /api/v1/workspaces/{id} already exists in the REST API; no backend work needed
  • Add the tool to the list shown in the README's MCP section

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions