LearnNewsExamplesServices
Frontmatter
id9847
titlefeat: Implement `remove_component` Neural Link Tool
stateOpen
labels
enhancementaifeature
assignees[]
createdAtApr 10, 2026, 10:33 AM
updatedAtApr 10, 2026, 10:33 AM
githubUrlhttps://github.com/neomjs/neo/issues/9847
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]

feat: Implement remove_component Neural Link Tool

Openenhancementaifeature
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