tp context show before running commands. Add root --json before the command when machine parsing needs JSON output; use root --profile <name> only to override the active profile.
Check context and available resources
Home and Canvas pages
Prefer idempotent apply by title for repeatable page creation:canvas pages create only for one-off pages, experiments, or exact REST payload checks.
Canvas renders the page title as the visible page heading. Do not duplicate that title as the first body H1. For document pages, begin body content with an introductory paragraph or a second-level section heading. For example, use:
Minimal page specification
contentWidth: "wide" or "full" only when the user asks for it or the page needs more horizontal room, such as dense dashboards, large tables, or embedded apps. Dashboard pages commonly use "full":
Dashboard widgets
lakehouse-query widgets. Common configs:
Discover the backend-supported visualization catalog before choosing a config:
yFields fallbacks for compatibility, but newly generated dashboards should not
depend on them.
Standard agent procedure:
- Run
tp canvas visualizations list. - Run
tp canvas visualizations describe <id>when details are needed. - Inspect the Lakehouse schema and preview the SQL.
- Create or apply the dashboard JSON using the documented camelCase roles.
- Run
tp canvas dashboard lint,schema,query, andvalidate-page.
--fresh only to verify a newly written Gold table. During layout changes, reuse the schema and preview result rather than reissuing SQL.
For dashboards with global filters, prefer dashboardDefinition datasets and bindings. Generate or validate the spec before creating the page:
${TP_DATABRICKS_CATALOG}.information_schema.tables; unqualified information_schema.tables can be rejected by the project catalog guard.
If the current local agent environment has working Databricks CLI auth, direct Databricks commands are acceptable for inspection or troubleshooting, but keep Canvas widget validation anchored to tp lakehouse so the query is checked through ThinkPlatform’s project-scoped API:
Cost-aware execution routes
- Local Agent/Codex: use
tp canvas ...andtp lakehouse ...; keep preview cached. - ThinkPlatform Agent: use Canvas MCP tools and the Databricks SQL preview system tool with
fresh=false. - Set
refreshSeconds: 0. Use 900 seconds or longer only when the user explicitly requires automatic refresh. - Prefer one dashboard dataset for widgets sharing source SQL or filters. Use a precomputed Gold table when the same expensive aggregation is viewed frequently.
- Run
lint,schema, and a bounded query while authoring; runvalidate-pageonce after the full page is ready.
Dynamic UI
dynamic-ui widget and the created uiId.
Verification checklist
- Read back the page/app by ID.
- Confirm
layout.surface, block count, widget kinds, and resource references. - For Mermaid or Dynamic UI, browser-check rendering when available.
- For action surfaces, verify the action target exists and is discoverable.