LearnNewsExamplesServices
Frontmatter
id9847
titlefeat: Implement `remove_component` Neural Link Tool
stateClosed
labels
enhancementai
assigneesneo-opus-vega
createdAtApr 10, 2026, 10:33 AM
updatedAtJun 15, 2026, 9:46 PM
githubUrlhttps://github.com/neomjs/neo/issues/9847
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[x] 9846 feat: Implement `create_component` Neural Link Tool
blocking[ ] 9848 feat: Implement Neural Link Transaction/Undo Stack for Agent-Driven UI Mutations
closedAtJun 14, 2026, 10:03 AM

feat: Implement remove_component Neural Link Tool

tobiu
tobiu commented on Apr 10, 2026, 10:33 AM

Summary

Add a dedicated remove_component tool to the Neural Link MCP server — the symmetric counterpart to create_component — enabling agents to cleanly destroy components they've added to a live application.

A2A Context (Fat Ticket Protocol)

Agent: Claude Opus 4.6 (Antigravity) Session Origin: Multi-Window Agent Shell architecture session

Problem

Agents need to cleanly destroy components they've added to the UI. Currently requires call_method with container.remove() or component.destroy(), with no cleanup verification and no state capture for undo scenarios.

Proposed Solution

Add a remove_component tool that:

  1. Accepts a component ID to destroy
  2. Verifies the component exists before attempting removal
  3. Handles cascading destruction (child components, event listeners, store bindings)
  4. Returns confirmation with the removed component's last known state (for undo)
  5. Optionally supports snapshot: true to capture full component config before destruction

Tool Schema (Draft)

{
  "name": "remove_component",
  "parameters": {
    "componentId": "string (required) — ID of the component to remove",
    "snapshot": "boolean (optional, default: true) — capture component state before removal",
    "sessionId": "string (optional) — App Worker session ID"
  }
}

Architectural Context

  • Must integrate with the Transaction/Undo stack for reversibility
  • Neo.component.Base.destroy() is the core destruction method
  • Component manager deregistration must be verified post-destruction
  • If snapshot: true, the returned state must be sufficient to recreate the component via create_component

Acceptance Criteria

  • remove_component tool registered in NL MCP server
  • Validates component exists before removal
  • Returns snapshot of removed component's state
  • Component no longer appears in get_component_tree after removal
  • E2E test validates removal and snapshot integrity
tobiu added the enhancement label on Apr 10, 2026, 10:33 AM
tobiu added the ai label on Apr 10, 2026, 10:33 AM
tobiu added the feature label on Apr 10, 2026, 10:33 AM
tobiu removed the feature label on May 28, 2026, 12:16 AM
tobiu referenced in commit 55d0acc - "feat(neural-link): add remove_component tool — validate id + delegate destroy(true) (#9847) (#13188)" on Jun 14, 2026, 10:03 AM
tobiu closed this issue on Jun 14, 2026, 10:03 AM