Metadata Scopes: Work With Only Part of an Org
A metadata scope is a named list of metadata types, each with a rule that says which components of that type count. Pick a scope on a deployment or a drift detection configuration, and mtdt.io shows and compares only that part of the org. Scopes belong to the team, so one scope can be reused across many deployments.
Where scopes live
Open Scopes in the menu. The Metadata scopes page lists every scope with its rules and a Used in column that counts the deployments and drift configurations using it. Filter the list with All, Built-in and Custom.
Built-in scopes come with mtdt and cannot be changed. To adjust one, Clone it and edit the copy.
Create a scope
- Click Create and enter a Name.
- Under Start from, pick Blank, one of the templates (Code, Automation, Access & security, UI, Reports & dashboards, Experience Cloud, Custom objects & fields) or Paste package.xml. Picking a starting point replaces the types you already picked.
- Set a rule for each type you need.
- Check the result in Preview, then Save.
Save stays disabled until the scope has at least one type and every Mask rule has at least one mask.
Rules for a type
Each type has one rule:
- Off — the type is not in the scope.
- All — every component of the type.
- Custom — only custom components, with
__in the API name. Offered for objects, fields and object translations. - Mask — components whose names match. Enter names or masks separated by commas:
Billing, Sales_*, *Test.*matches any characters, a name without*matches exactly that name, and letter case is ignored.
Field names include their object, for example Account.Region__c. A rule on Fields applies to fields of any object, standard ones included.
Types that live inside an object (fields, validation rules, record types, list views and others) show Follow when Objects has a rule and theirs is off. They then come along with the objects in the scope. Give such a type its own rule to choose its components separately.
When a type has a mask, Apply to N other types set to All copies that mask to the other types set to All.
Start from a package.xml
Paste package.xml turns a manifest into rules. Each type in it becomes a row: its members become a mask, * becomes All, and CustomLabel members become a mask on Labels. Types that mtdt does not know are left out, and the editor lists them.
Preview against an org
The Preview panel shows what the scope picks in a real org. Choose an org, and for each type you see how many components match and how many the org has. show lists sample names. A warning mark next to a type means nothing matches its rule, the type is not in that org, or it could not be read.
Use a scope
In a deployment. In the deployment dialog, pick a scope under Scope. Add Items, Full Comparison and Auto Collect then show only the types in the scope. Items already selected stay in the deployment. For a deployment from an uploaded archive, the archive is loaded with the scope chosen when the deployment is created; to use another scope, create a new deployment.
In a full comparison. With a scope on the deployment, Full Comparison starts a Scoped Metadata Comparison that covers only the scope's types. The result remembers the scope it ran with.
In drift detection. In a drift configuration, pick a Metadata scope, and drift compares only those types. Custom labels are compared and synced all together, so rules for single labels do not apply there.
Next to the picker, Preview shows what the scope picks in the org, and Manage scopes opens the Scopes page in a new tab. No scope — all metadata is the default.
Change or delete a scope
A scope is shared: when you change its rules, every deployment and drift configuration that uses it gets the new rules.
Before you delete a scope, check Used in. The deployments and drift configurations that used it then run without a scope, and their scope field says This scope is no longer available until you pick another scope or No scope.
Who can manage scopes
Team admins choose who can view, edit and delete scopes in Team Settings → Roles & permissions, area Scopes. Members who can view scopes but not edit them open each scope read-only. See Team Access and Roles.
FAQ
What is a metadata scope in mtdt.io? A scope is a saved list of metadata types with a rule for each type: all components, only custom ones, or the ones whose names match a mask. Deployments and drift detection use it to work with only that part of an org.
Can I build a scope from an existing package.xml?
Yes. Choose Paste package.xml when you create a scope. Each type becomes a rule, its members become a mask, and * becomes All.
How do I check what a scope will pick before using it? Open Preview in the scope editor or next to the scope picker and choose an org. For each type it shows how many components match out of how many the org has, with sample names.
What happens to deployments when I delete a scope? They run without a scope. The Used in column shows how many deployments and drift configurations use a scope before you delete it.
Can I change a built-in scope? No. Clone it from the Scopes page and edit the copy.