The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
id: read-resource title: Reading resources by URI description: Navigating the Metabase instance with read_resource — load to learn the URI patterns (databases, collections, tables, models, questions, metrics, transforms, dashboards) and when to drill vs. search. tools: [read_resource] priority: 50
When using the read_resource tool, you have access to a unified interface for navigating the Metabase instance and retrieving data about its resources via URI patterns.
The URI pattern determines what is returned — from top-level lists (databases, collections) to a single entity, to its sub-resources (fields, items, sources, derived items).
You can request multiple resources in one call by providing a list of URIs (max 5). Lists are paginated at 25 items per page. Every <list> carries total, page, pages, showing, and truncated — truncated is always present, reading "true" when pages remain after this one and "false" when this is the last page (which only means the whole list if you've also fetched every earlier page — on page 3 of 3, "false" still means you've only seen a third of the list). When more pages remain, a <truncation-note> names the next page and gives you the exact URI to fetch it — copy that URI as-is; don't build your own page=N query param (a second ? on a URI that already has one silently breaks the query instead of erroring). Drill into a specific item via its URI (list items carry a uri="..." attribute — the exception is a dashboard's virtual items, virtual_heading/virtual_text and the like, which are not addressable resources and carry a dashcard_id instead), or refine via search.
When to Use read_resource vs search
Use read_resource when you already know the structure to enumerate.
- "List all databases" →
metabase://databases(NOT an empty/generic search) - "What's in this collection?" →
metabase://collection/{id}/items - "What cards does this dashboard have?" →
metabase://dashboard/{id}/items - "What schemas does this database have?" →
metabase://database/{id}/schemas
Use search when you don't know what or where something lives — open-ended discovery by topic.
If you have no
searchtool, substitute whichever discovery tool you do have (e.g.retrieve_library_entities) everywhere this skill sayssearch— the loop is the same, only the entry point differs. Its results carry the same URIs, so everything below about drilling in withread_resourcestill applies.
The exploration loop:
searchfor a topic → every result carries auriattribute.- If a top hit is a container — its element name is
<dashboard>or<document>—read_resourceon its URI to enumerate members instead of re-searching. (searchnever returns collections; reach those by navigating, e.g.metabase://collection/{id}/items.) - Drill into specific items via
read_resourcefor fields, sources, or details. - Walk lineage when needed:
metabase://table/{id}/derived,metabase://model/{id}/sources,metabase://transform/{id}/sourcesor/target.
Anti-pattern: searching for empty-string or generic terms ("all tables", "everything") to "list everything" — use the navigation URIs above.
Supported URI Patterns
Navigation (top-level lists, no id)
metabase://databases— all databases readable by youmetabase://collections— root collections (children of "/")metabase://collections?tree=true— flat list of all collections; use:location(e.g./12/34/) and:pathto understand hierarchymetabase://user/recent-items— your recently-viewed items
Examples:
- User asks "what databases do we have?" →
metabase://databases - User asks "what have I been looking at?" →
metabase://user/recent-items - Need to map out the whole instance before drilling in →
metabase://collections?tree=true
Database resources
metabase://database/{id}— basic database infometabase://database/{id}/tables— tables in the databasemetabase://database/{id}/models— models targeting the databasemetabase://database/{id}/schemas— schemas in the database (each one carries a URI you can drill into)metabase://database/{id}/schemas/{schemaName}/tables— tables in a specific schema
Examples:
- Want to see warehouse layout before building a query? →
metabase://database/2/schemasthenmetabase://database/2/schemas/public/tables - Database without schemas, like the Sample Database (its
/schemaslist is empty)? →metabase://database/1/tables - Want curated models in a specific warehouse? →
metabase://database/1/models
Best Practices:
- For a high-cardinality database, prefer schema → tables drill-down over fetching every table at once.
- When
searchtakes adatabase_idargument, it already scopes to the current database — no need to filter further. Elsewhere,searchhas no per-database filter; narrow withentity_typesand topic terms instead.
Collection resources
metabase://collection/{id}— basic collection infometabase://collection/{id}/items— direct children (mix of subcollections, cards, models, metrics, dashboards, documents)metabase://collection/{id}/subcollections— only the subcollections (useful for orientation in deep trees)
Examples:
- "What's in the Marketing collection?" →
metabase://collection/{id}/items - Need to navigate a deep tree without enumerating every leaf? →
metabase://collection/{id}/subcollections
Best Practices:
- Collections are never
searchresults — the only way to reach one is by navigating (metabase://collections,metabase://collections?tree=true, or a parent's/subcollections). To see what a collection holds,read_resourceits/itemsrather than searching for the collection's name.
Table resources
metabase://table/{id}— basic table infometabase://table/{id}/fields— table with fieldsmetabase://table/{id}/fields/{field_id}— specific field with sample values and statsmetabase://table/{id}/derived— cards (questions/models) built on this table, plus the transforms that declare it as a source. Onlypythontransforms declare their source tables, so a SQL/querytransform reading this table will not appear here.
Examples:
- Want table structure (fields without value information)? →
metabase://table/123/fields - Want detailed field information (sample values for format patterns)? →
metabase://table/123/fields/1 - "What's already built on this table?" before suggesting a new query →
metabase://table/123/derived
Best Practices:
- Before building on a raw table, check
/derived— there may be a curated model or saved question that already answers the user's need.
Model resources
metabase://model/{id}— basic model infometabase://model/{id}/fields— model with fieldsmetabase://model/{id}/fields/{field_id}— detailed field info with sample valuesmetabase://model/{id}/sources— tables/cards this model is derived from (FK-resolved: database, source table, and source card if any)
Examples:
- Want model structure? →
metabase://model/456/fields - Want sample values for format patterns? →
metabase://model/456/fields/1 - Need to understand a model's lineage before editing or chaining off it? →
metabase://model/456/sources
Question resources
metabase://question/{id}— basic question infometabase://question/{id}/fields— question with fieldsmetabase://question/{id}/fields/{field_id}— detailed field info with sample valuesmetabase://question/{id}/sources— tables/cards this question references (FK-resolved)
Examples:
- "What does this question return?" →
metabase://question/456/fields - "What's the data source behind this saved question?" →
metabase://question/456/sources
Metric resources
metabase://metric/{id}— basic metric infometabase://metric/{id}/dimensions— metric with queryable dimensions (fields you can filter/group by)metabase://metric/{id}/dimensions/{dimension_id}— specific dimension with sample values
Examples:
- Want metric dimensions? →
metabase://metric/789/dimensions - Want sample values for a dimension? →
metabase://metric/789/dimensions/1
Transform resources
metabase://transform/{id}— transform details and configuration, including the source query for aquerytransform. Python transforms reporttype="python"but their script body is not included.metabase://transform/{id}/sources— the source database, plus source tables forpythontransforms only (see below)metabase://transform/{id}/target— target database and table this transform writes to
Examples:
- Want to inspect a
querytransform's SQL/MBQL? →metabase://transform/42 - "What does this transform read?" →
metabase://transform/42/sources - "Where does this transform write?" →
metabase://transform/42/target
Best Practices:
- Fetch a transform's details to inspect its target configuration and — for
querytransforms — its source query. - Check the returned source type (
queryorpython) first: it decides both how the transform is implemented and how much lineage you can see. - Lineage is asymmetric between the two source types. A
pythontransform declares its inputs explicitly, so/sourceslists its source tables and those tables'/derivedlists it back. Aquerytransform's inputs live inside its query, which is not walked — so/sourcesreturns only its database with no tables, and it never shows up under any table's/derived, even when its SQL plainly reads that table. - Because of that asymmetry, a table's
/derivedis not proof that nothing reads it. When it matters whether aquerytransform touches a table, fetch the candidate transforms' details and read their source queries rather than trusting/derivedto be complete. - Walk
/sourcesand/targetto understand lineage before recommending downstream changes, keeping the gap above in mind.
Dashboard resources
metabase://dashboard/{id}— dashboard detailsmetabase://dashboard/{id}/items— everything on the dashboard in layout order: card-backed dashcards (each with a URI you can drill into, matching the backing card's own type —metabase://question/{id},metabase://model/{id}, ormetabase://metric/{id}) plus headings, text cards, and action buttons
Examples:
- Want to understand what a dashboard contains before recommending it? →
metabase://dashboard/158 - User asks "what's on this dashboard?" →
metabase://dashboard/158/items
Best Practices:
- Treat dashboards as containers — when search returns a
<dashboard>hit, use/itemsto list its cards instead of re-searching for the same concept. - Every dashcard entry carries a
dashcard_id. Headings and text cards show asvirtual_heading/virtual_textwith their text as the description; action buttons show asaction(with aurito their backing model when readable). On multi-tab dashboards the list opens with a<tabs>block naming every tab — empty ones included — and dashcard entries carry their tab'stab_id, grouped in tab order. - Fetch dashboard details to confirm it contains the information the user is looking for before recommending it.
- Prefer verified dashboards when they match the user's request.
General Best Practices
- Drill, don't re-search. If a
searchresult is a container or you need more detail on a specific item, feed itsuriback intoread_resource— don't issue another search for the same concept. - Batch read URIs (up to 5 at a time) when you need parallel context, e.g. fetching
/sourcesfor several candidate models at once. - Honor truncation. If a list response carries
truncated="true", the most-relevant items are not guaranteed to be in the first 25. You have two ways forward: page through the remainder by fetching the URI given in the<truncation-note>(thepagesattribute tells you how many there are), or narrow the request — scope it (metabase://database/{id}/...) or refine yoursearchquery (narrowerentity_typesor topic terms). Narrow when you are hunting for one specific item; page when you genuinely need the whole list, and remembertruncated="false"on a later page doesn't mean you've seen the earlier ones too. - Curation matters. Search results carry
is_verified,is_official, andis_curatedflags (plusdata_authoritywhere configured) — when you have a choice, drill into the curated item rather than the raw one.