Package Manifest

Every Power Platform ToolBox tool requires a package.json file at the root of the distribution. This file describes your tool to the ToolBox host and the npm registry.

Overview

The package.json follows the standard npm package format with additional PPTB-specific fields. Required fields must be present for your tool to load correctly.

Required Fields

FieldTypeDescriptionSample
namestringScoped npm package name — lowercase, no spaces"@myorg/my-tool"
versionstringSemVer-compatible version"1.0.0"
displayNamestringHuman-readable name shown in the ToolBox UI"My Awesome Tool"
descriptionstringShort description of what the tool does"Manage Dataverse solutions"
mainstringEntry-point file relative to the dist root"index.html"
iconstringPath to SVG icon relative to the dist root. Use fill="currentColor" to support light/dark themes"icons/tool.svg"
licensestringAn approved open-source license identifier"MIT"
contributorsarrayOne or more objects with a name and optional urlSee below
configurationsobjectPPTB-specific links and metadataSee Configurations Object

contributors array

Each entry must have at minimum a name.

"contributors": [
  { "name": "Jane Dev", "url": "https://janedev.com" },
  { "name": "John Doe" }
]

Allowed licenses: MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, GPL-2.0, GPL-3.0, LGPL-3.0, ISC, AGPL-3.0-only.

Configurations Object

Nested inside the top-level configurations key.

FieldRequiredTypeDescriptionSample
repositoryYesstringURL of the tool's source repository — shown in the ToolBox help menu"https://github.com/myorg/my-tool"
websiteNostringTool website or documentation URL"https://docs.myorg.com/my-tool"
readmeUrlNostringRaw githubusercontent.com URL for the README — used to display docs inside ToolBox"https://raw.githubusercontent.com/myorg/my-tool/main/README.md"

Optional Fields

FieldTypeDescriptionSample
homepagestringPublic homepage URL"https://myorg.com"
repositoryobjectStandard npm repository object{ "type": "git", "url": "https://github.com/…" }
cspExceptionsobjectAdditional Content Security Policy origins your tool connects toSee CSP Exceptions Object
featuresobjectDeclare special ToolBox capabilities required by your toolSee Features Object

Features Object

Declare ToolBox-specific capabilities your tool needs. Omit this section entirely if neither field applies.

FieldTypeValuesDescriptionSample
multiConnectionstring"optional" | "required"Whether the tool supports or requires a second Dataverse connection"optional"
minAPIstringSemVerMinimum ToolBox API version the tool requires"1.2.0"
"features": {
  "multiConnection": "optional",
  "minAPI": "1.2.0"
}

Specifying a Minimum API Version

The minAPI field lets you declare the lowest ToolBox API version your tool is compatible with. When a user installs or opens your tool, Power Platform ToolBox checks this value against the currently installed ToolBox version. If the installed version is older than the minimum required, ToolBox will alert the user and recommend upgrading before they can use the tool.

When to set minAPI:

  • Your tool calls an API or uses a feature that was introduced in a specific ToolBox release (for example, multiConnection requires 1.2.0 or later).
  • You want to prevent runtime errors caused by a user running an older, incompatible version of ToolBox.

How to determine the correct value:

Each function in the API Reference includes a Requires vX.Y.Z badge showing the minimum ToolBox version it needs (where applicable). Set minAPI to the highest such version across all the functions your tool depends on.

CSP Exceptions Object

Declare additional external origins that your tool's iframe is permitted to connect to. Omit this section entirely if your tool only communicates with Dataverse endpoints. All fields are optional.

Each directive accepts an array of entries. An entry can be either a plain string (just the domain) or an object with the following properties:

FieldTypeRequiredDescriptionSample
domainstringYesThe origin/domain to allow"api.example.com"
exceptionReasonstringNoMarkdown description explaining why this CSP exception is needed. Displayed to users in the consent dialog."Used to **read** configuration details."
optionalbooleanNoWhen true, indicates the exception is optional — the core tool works without it, but granting it enables additional functionality. Defaults to false.true

The supported CSP directives are:

DirectiveDescriptionSample domain
connect-srcFetch, XHR, WebSocket, and EventSource origins"api.example.com"
script-srcAdditional origins allowed to serve scripts"cdn.example.com"
style-srcAdditional origins allowed to serve stylesheets"fonts.googleapis.com"
img-srcAdditional origins allowed to serve images"img.example.com"
font-srcAdditional origins allowed to serve fonts"fonts.gstatic.com"
frame-srcOrigins allowed to be embedded in iframes"embed.example.com"
media-srcOrigins allowed to serve audio/video media"media.example.com"
"cspExceptions": {
  "connect-src": [
    {
      "domain": "api.example.com",
      "exceptionReason": "Used to **fetch** live data for the dashboard."
    }
  ],
  "script-src": [
    {
      "domain": "cdn.example.com",
      "exceptionReason": "Loads the charting library used to render reports."
    }
  ],
  "style-src": [
    {
      "domain": "fonts.googleapis.com",
      "exceptionReason": "Provides the UI font family.",
      "optional": true
    }
  ],
  "img-src": ["img.example.com"],
  "font-src": ["fonts.gstatic.com"],
  "frame-src": ["embed.example.com"],
  "media-src": ["media.example.com"]
}

Full Example

{
  "name": "@myorg/my-awesome-tool",
  "version": "1.0.0",
  "displayName": "My Awesome Tool",
  "description": "Manage Dataverse solutions across environments with ease.",
  "main": "index.html",
  "icon": "icons/tool.svg",
  "license": "MIT",
  "contributors": [
    { "name": "Jane Dev", "url": "https://janedev.com" },
    { "name": "John Doe" }
  ],
  "configurations": {
    "repository": "https://github.com/myorg/my-awesome-tool",
    "website": "https://docs.myorg.com/my-awesome-tool",
    "readmeUrl": "https://raw.githubusercontent.com/myorg/my-awesome-tool/main/README.md"
  },
  "features": {
    "multiConnection": "optional",
    "minAPI": "1.2.0"
  },
  "cspExceptions": {
    "connect-src": [
      {
        "domain": "api.example.com",
        "exceptionReason": "Used to **fetch** live configuration data for the dashboard."
      }
    ],
    "img-src": [
      {
        "domain": "img.example.com",
        "exceptionReason": "Loads thumbnails for the media browser.",
        "optional": true
      }
    ]
  },
  "keywords": ["dataverse", "power-platform", "solutions"],
  "homepage": "https://docs.myorg.com/my-awesome-tool",
  "repository": {
    "type": "git",
    "url": "https://github.com/myorg/my-awesome-tool.git"
  },
  "bugs": {
    "url": "https://github.com/myorg/my-awesome-tool/issues"
  },
  "dependencies": {},
  "devDependencies": {
    "@pptb/types": "^1.0.0",
    "typescript": "^5.0.0",
    "vite": "^5.0.0"
  },
  "scripts": {
    "build": "vite build",
    "dev": "vite"
  }
}

Was this page helpful?