Port dashboard pages
A Port dashboard page is a sidebar entry made of one or more widgets (tables, charts, markdown, links, and more) arranged in a 12-column grid. It can also carry page filters and one page-level date range that narrow what its widgets show.
Prerequisites
- Go over the
port-getting-startedskill first if this is your first time working with Port. - The blueprints the widgets query already exist, with the properties you plan to filter, group, or chart on.
- This skill uses Port's MCP server
(
get_sidebar,load_widget_schema,list_blueprints,list_entities,upsert_dashboard_page,upsert_widget,get_page) to create the page and to check datasets against real entities. Without it, give the user the final page JSON to create with the Port UI's dashboard editor or the Pages API, and usesearch_port_knowledge_sourcesfor anything this skill doesn't cover.
Step 1 - Confirm it is a dashboard page
Port has three kinds of page that are easy to mix up:
- Dashboard (this skill): a layout that contains widgets, often several, such as charts, KPIs, or a table next to other widgets.
- Catalog page (type
blueprint-entities): the whole page is one table of a blueprint's entities. Usecatalog-page-helperandupsert_catalog_page. - Entity page (type
entity, identifier<blueprint>Entity): the tabs on one blueprint's entity pages. Useentity-page-helperandupdate_entity_page. Never callupsert_dashboard_pageon an entity page.
Decide without asking when the request is clear: "catalog", "list of all X", or "all entities of blueprint Y" is a catalog page. "Dashboard", "home page", charts or KPIs, several widgets, or "a table on a page" is a dashboard. Do not default to a dashboard for a vague "page with a table". If it is still ambiguous, ask once: a catalog table page, or a dashboard with a table widget. Offer entity pages only when the user means tabs on an existing entity page.
Step 2 - Decide sidebar placement
Before creating a page that is not private, call get_sidebar and place it
the way the Port UI does:
- Default: put it at the end of the sidebar root. Take the last top-level item
in
itemsthat is not a private page, and passafter: "<that identifier>"with noparent. If the root is empty, omitafter. - One folder clearly matches the topic: pass
parent: "<folder id>", andafteras the last item in that folder (omitafterif it is empty). - Several folders are plausible: ask the user which one. If they have no preference, use the root.
A page created without after while the root already has items can land in
the wrong place. Field details are in
references/dashboards.md.
Step 3 - Choose widgets and validate each dataset
Pick one widget per question the dashboard answers, from the types in
references/dashboards.md. Use a
table to list entities, a number chart for a single count, a pie or bar chart
to break a count down by a property, and a line chart for change over time.
Call load_widget_schema for a widget type before you build it, so you know
its required fields.
If no built-in widget fits, read references/custom-widgets.md before you recommend or build a custom widget. It covers when a custom widget is allowed and the confirmation turn it needs before the page is saved.
A widget's dataset decides which entities it shows, and a wrong dataset
silently produces an empty or wrong widget. For every widget with a dataset:
- Find the blueprint. It can be a top-level
blueprintfield, inside the dataset rules, or both, depending on the widget type. - Run
list_entitieswith the dataset asquery,countOnly: true, and a smalllimit(3-5), and check that the count and entities look right. - If it errors or looks wrong, call
list_blueprintsto check property names, types, and enum values, fix the dataset, and retry. - Create the widget only with a dataset that returned the expected entities.
After creating it, call get_page and re-run list_entities against the
saved widget's dataset. Fix it with upsert_widget if the result is wrong.
The rule grammar for datasets is in
references/dashboards.md.
For table bar filters, sorts, and groups on a table-entities-explorer
(blueprintConfig.*.filterSettings, sortSettings, groupSettings), use
table language, not dataset clauses. catalog-page-helper explains the
difference.
Step 4 - Lay out the page
Arrange the widgets into rows. Every row's column sizes must sum to exactly
12, a row holds at most 4 columns, each column is 3-12 wide, and every row is
at least 400px tall. Each layout column's id must match a widget's id,
one to one. The layout schema and worked examples are in
references/dashboards.md.
Step 5 - Create or update the page
Decide from the conversation whether this is a new page or a change to an existing one.
- Create: use a new identifier and call
upsert_dashboard_pagewith the fullidentifier,title,widgets, andlayout. If the user gave no icon, passicon: "Apps"and do not ask which one. Remember theidentifierthe tool returns, especially for private pages. - Update: pass the exact page identifier, preferably one from this chat's
create response,
get_page, orget_sidebar. If you do not know which page, ask or look it up. Do not invent an identifier or create a duplicate. Do not changeiconunless the user asked. - Five or more widgets: try the full page first. If that fails on size or
complexity, create an empty page with
widgets: [], add the widgets with parallelupsert_widgetcalls, then callget_pageand send itswidgetsunchanged to a finalupsert_dashboard_pagethat adds only the newlayout.
After a successful create or update, reply with a markdown link built from the
absolute url the tool returned, as [<page title>](<url>). Do not build a
relative /{identifier} link: relative links break outside the Port app, for
example in an editor. Use the returned identifier for follow-up edits. The
raw API envelope, if you are not using the MCP tools, is in
references/dashboards.md.
Step 6 - Page filters and the date range
Before you set or change pageFilters or pageDateFilter, read
references/filters.md. It has the full list of date
range types, which widgets the range applies to, and how to set, change, or
clear it.
The essentials:
pageFiltersreplaces the whole list. Callget_pagefirst, then send the full list back.pageDateFilteris{ "range": { ... }, "exclude": ... }, whereexcludeis optional. Pass it toupsert_dashboard_pageto set it, omit it to leave it unchanged, or passnullto clear it. To change only the range, pass the pageidentifierandpageDateFilterwithoutwidgetsorlayout.- Use a relative range (
quickRange,last,since,periodToDate) when the user says things like "last 30 days", because it stays current as time passes. Usefixedonly for dates the user names. - Tables, boards, pie charts, and bar charts filter by their
dashboardDateProperty, which defaults to$createdAt. Set it when the user wants another date. Number and line charts use their own date settings, so do not set it on them. - Add
exclude(today,currentWeek,currentMonth, orcurrentQuarter) when the user wants the current, unfinished period left out of a relative range, for example "last 30 days, not including today". Do not combine it withnext. - Set
ignoreDashboardDateFilter: trueon any widget the date range should not narrow, such as an all-time total beside a filtered chart. It works on tables, boards, pie charts, bar charts, number charts, line charts, and multi-line charts. Leave it out otherwise: the widget is then filtered. - Leave
pageDateFilterout when the user did not ask for a date range.
Step 7 - Private pages
For a personal dashboard, set visibility: "private" and leave out parent
and after entirely. Port appends an owner-specific suffix to the identifier
it returns. Use that returned identifier for every later edit, widget update,
delete, and link. From the UI, set Visibility to Private when creating
the page; an org admin must first grant the create:private-pages scope if the
option is missing. Who can view or edit a page later is the port-permissions
skill's page-permissions reference. The full rules and an example are in
references/dashboards.md.
Gotchas
- A widget that renders empty or with the wrong entities almost always has a
dataset on the wrong property, the wrong blueprint, or a misspelled enum
value. Validate it with
list_entitiesbefore creating the widget. - "Column sizes must sum to 12" means one row's
sizevalues do not add up to 12. Recompute that row, with at most 4 columns of 3-12 each. - A row
heightunder 400 is rejected, so set every row to at least 400. - A layout column whose
idmatches no widgetidmakes the widget never render. Keep the two in sync exactly. - A private page edit that silently hits the wrong page, or returns 404, used the identifier you sent instead of the owner-suffixed one Port returned.
- Private page creation is rejected when
parentorafteris set. Omit both. - A number chart showing 0 or an error is usually missing a field its
chartTypeneeds, such asfuncoraverageOfforaggregateByProperty. See references/dashboards.md. - A pie or bar chart
propertythat is rejected needs the prefixed form (property#,relation#,scorecard#) or a meta field such as$identifier,$title, or$team. See references/dashboards.md. - A
table-entities-explorermust havedisplayMode: "widget"and atitle. paramValuesfor acustom-widgetmust match each param's type: only anobjectparam takes an object. A blueprint param takes the identifier string. See references/custom-widgets.md.- Asking the user "add it to a dashboard?" is not the
paramValuesconfirmation. Show the values table and wait for the user to confirm it in a separate turn before the upsert. - A date range set on a catalog page or entity page goes through a different
tool. Entity pages use
update_entity_pagewithpageDateFilter, and the range applies to every entity of that blueprint.
