Skip to main content

Droost: Canvas Tree Get

droost_canvas_tree_get Read-only

Module: Droost Canvas

Reads a page's component tree as the same flat item list droost_canvas_tree_set writes — the read half of the read-modify-write loop. Fetch, splice your change into the items, validate, then set.

Example call
{
    "tool": "droost_canvas_tree_get",
    "arguments": {
        "id": "1"
    }
}
Example response — captured live on this site
{
    "success": true,
    "message": "canvas_page 1 (\"Droost — boost your AI agent on Drupal\") components: 22 tree item(s), 5 root(s).",
    "data": {
        "entity_type": "canvas_page",
        "id": "1",
        "label": "Droost — boost your AI agent on Drupal",
        "field": "components",
        "items": [
            {
                "uuid": "71d60cd0-0000-4000-8000-000000000001",
                "component_id": "sdc.droost_tailwind.hero",
                "component_version": "251b984f66815db2",
                "parent_uuid": null,
                "slot": null,
                "inputs": {
                    "title": "Droost",
                    "subtitle": "Boost your AI coding agent on Drupal: 54 schema-described MCP tools that introspect, compose, and change a real site — deterministically, validated, and gated.",
                    "min_height": "full"
                },
                "label": "Hero"
            },
            {
                "uuid": "71d60cd0-0000-4000-8000-000000000002",
                "component_id": "sdc.droost_tailwind.button",
                "component_version": "fbb0fd33486754e7",
                "parent_uuid": "71d60cd0-0000-4000-8000-000000000001",
                "slot": "actions",
                "inputs": {
                    "label": "Get started",
                    "url": "/get-started",
                    "variant": 
… (truncated — run it yourself for the rest)

Reads an entity's Canvas component tree: the flat, ordered items (uuid, component_id, component_version, parent_uuid, slot, decoded inputs, label) plus the derived hierarchy (roots, children per parent). The component_tree field is auto-discovered (pass "field" if the entity type has several). Output items are directly reusable as droost_canvas_tree_set input. Read-only.

Input schema (JSON Schema)
{
    "type": "object",
    "properties": {
        "entity_type": {
            "type": "string",
            "description": "Entity type id (default \"canvas_page\" — the Drupal CMS canvas page type)."
        },
        "id": {
            "type": "string",
            "description": "The entity id."
        },
        "field": {
            "type": "string",
            "description": "The component_tree field name; omit to auto-discover."
        }
    },
    "required": [
        "id"
    ]
}