> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: "getComponentInsertUrlAndTypes"
sidebarTitle: "getComponentInsertUrlAndTypes"
description: "Get the insert URL, import statement and prop types documentation for components. The id parameter can be either: - A component node ID (from getProjectXml Components section) - A code file ID (from g"
tag: "TOOL"
tagColor: "purple"
gridGap: 30
---

<Aside full>
  <RequestExample>
    ```json lines=false
    {
      "method": "tools/call",
      "params": {
        "name": "getComponentInsertUrlAndTypes",
        "arguments": {
          "id": "string"
        }
      }
    }
    ```
  </RequestExample>
</Aside>

<MCPTool {...{"name":"getComponentInsertUrlAndTypes","description":"Get the insert URL, import statement and prop types documentation for components.\n\nThe id parameter can be either:\n- A component node ID (from getProjectXml Components section)\n- A code file ID (from getProjectXml CodeComponents section)\n\nUse this tool when you want to:\n- Insert a component into the canvas via updateXmlForNode (get the insertUrl to use in XML)\n  - Use insertUrl as-is for linked components (updates with source)\n  - Add ?detached=true to insertUrl for detached/unlinked layers (editable, won't update). After inserting detached components, call getNodeXml on the parent to inspect the actual internal structure created.\n- Use an existing component in a code file (get the import statement)\n- See what props/attributes are available for a component, to use them in XML","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"The ID of the component node or code file to get information for"}},"required":["id"],"additionalProperties":false},"annotations":{"readOnlyHint":true}}} />
