mpackage.json
Note
This page documents schemaVersion
1.1.0 for the package definition file mpackage.json.
This schema version was released as part of MATLAB® R2025a. Because the mpackage.json schema is both forward
and backward compatible, package definition files of any schemaVersion
can be used in any MATLAB release since R2024b, when mpackage.json was introduced.
However, package definition files with schema released later than your version of MATLAB
might have some features disabled.
For additional information on schema versions and corresponding MATLAB releases, see
schemaVersion.
When you create a package using mpmcreate, the MATLAB Package
Manager creates a package definition file named mpackage.json. The file
saves package metadata, such as the package name, version, member folders, and dependencies.
The mpackage.json file is stored in the resources folder
located in the root folder of the package.
You can change the package metadata by manually editing the package definition file.
Alternatively, you can change the metadata by setting properties of the matlab.mpm.Package object corresponding to the package.
Here is a sample package definition file:
{
"name": "SampleToolbox",
"version": "2.0.1",
"id": "af92112b-8b66-44d1-b4b1-848f54affa3e",
"displayName": "My Sample Toolkit",
"summary": "My summary goes here.",
"description": "My description goes here.",
"provider": {
"name": "John Doe",
"organization": "The MathWorks, Inc.",
"email": "jdoe@mathworks.com",
"url": "mathworks.com"
},
"folders": [
{
"path": "functions",
"languages": [
"matlab"
]
}
],
"dependencies": [
{
"name": "CornersPkg",
"compatibleVersions": ">1.0.0",
"id": "e6c4123e-0068-42be-aef2-00d49d1509f5"
}
],
"releaseCompatibility": ">R2025a",
"schemaVersion": "1.1.0"
}Properties
Tips
In order for MATLAB to detect changes to
mpackage.json, the package must be in editable mode. For additional information, see Turn Your Code Into a Package.