Tool Configuration

pptb.config.json is an optional file placed next to your tool's package.json. It declares Power Platform ToolBox–specific contracts: how other tools can invoke yours, how AI assistants can call it through MCP, and which .NET workers it uses.

Overview

While package.json describes your tool to npm and the ToolBox host, pptb.config.json describes integration contracts. Every section is optional — add only the sections your tool needs.

SectionUsed byLearn more
invocationOther PPTB tools launching yours, and MCP callersInter-Tool Invocation
agentsAI assistants calling your tool through the PPTB MCP serverAgent Integration
workersYour tool's UI, to run packaged .NET console workers.NET Workers

Place the file in the root of your tool package so that pptb-validate can discover and validate it automatically alongside package.json. See Local Validation.

Top-Level Fields

FieldTypeRequiredDescription
invocationobjectNoInvocation contract — how this tool can be called by other tools. See Invocation Object.
agentsobjectNoAgent contract — how this tool can be called by external automation. See Agents Object.
workersobjectNoNative worker declarations keyed by a stable worker ID. Requires features.minAPI in package.json. See Workers Object.

Invocation Object

Describes the data callers can pre-populate when opening your tool, and the data your tool returns when it finishes.

FieldTypeRequiredDescriptionSample
versionstringYes (when invocation is present)Semantic version of the invocation contract (MAJOR.MINOR.PATCH[-prerelease][+build]). Independent of your npm package version — bump it when the shape of prefill or returnTopic changes."1.0.0"
capabilitiesstring[]NoCapability tags used for discovery via findToolsByCapability(). See Capability Tags.["entity-picker"]
prefillobjectNoJSON-schema–style object describing the data a caller can pass in. Contains a properties map.See below
returnTopicobjectNoJSON-schema–style object describing the data your tool returns to its caller. Contains a properties map.See below
{
  "invocation": {
    "version": "1.0.0",
    "capabilities": ["entity-picker"],
    "prefill": {
      "properties": {
        "entityName": {
          "type": "string",
          "title": "Table",
          "description": "Logical name of the table to browse",
          "required": true
        },
        "allowMultiSelect": { "type": "boolean" }
      }
    },
    "returnTopic": {
      "properties": {
        "selectedId": { "type": "string" },
        "selectedName": { "type": "string" },
        "status": { "type": "string", "enum": ["success", "cancelled", "error"] }
      }
    }
  }
}

Schema Property Descriptors

Each entry in prefill.properties and returnTopic.properties is a property descriptor. All fields are optional.

FieldTypeDescriptionSample
typestringJSON type of the value: "string", "number", "boolean", "object", or "array""string"
enumstring[]Restricts the value to one of the listed literals["success", "cancelled", "error"]
itemsobjectProperty descriptor for the elements of an array property{ "type": "string" }
titlestringShort human-readable label. Shown to the user when an agent must ask for this value"Table"
descriptionstringExplains the value. Shown to the user when an agent must ask for this value"Logical name of the table to browse"
requiredbooleanMarks the property as required. When an MCP agent calls the tool without a required value, the value is requested from the usertrue
"attributes": {
  "type": "array",
  "items": { "type": "string" },
  "title": "Columns",
  "description": "Logical names of the columns to include"
}

Capability Tags

invocation.capabilities lists tags that callers use with toolboxAPI.invocation.findToolsByCapability(tag) to discover your tool.

TagDescription
fetchxmlAccept or process FetchXML queries
entity-pickerBrowse and select a Dataverse entity (table)
record-selectorBrowse and select a Dataverse record
solution-selectorPick a Power Platform solution
webresource-editorEdit or manage web resources
plugin-inspectorInspect or manage plugins and assemblies
pcf-control-builderBuild or scaffold PCF controls

The authoritative list lives in the PPTB capability registry, so new tags can be added without an app update. Retrieve the current list at runtime with toolboxAPI.invocation.getKnownCapabilityTags(). Custom strings are allowed for organisation-internal tags, but pptb-validate warns when a tag is not in the official registry.

Agents Object

Desktop only

Declares how AI assistants and other external automation can call your tool through the PPTB MCP server.

FieldTypeRequiredDescriptionSample
versionstringYes (when agents is present)Semantic version of the agent-facing contract"1.0.0"
headlessbooleanYes (when agents is present)Whether the tool supports headless (automated) executiontrue
invokablebooleanNoOpt-in flag that exposes the tool to the MCP server. Tools are not discoverable by agents unless this is truetrue
modesstring[]NoSupported invocation modes: "one-way" (fire-and-forget) and/or "two-way" (returns a result)["one-way", "two-way"]
defaultModestringNoMode used when the caller does not specify one: "one-way" or "two-way""two-way"
timeoutMSnumberNoTimeout hint, in milliseconds, for two-way calls12000
executionModesstring[]NoSupported execution modes: "windowed" (interactive UI) and/or "headless" (automated). When both are listed, headless is used by default and windowed is the fallback["windowed", "headless"]
defaultExecutionModestringNoCurrently ignored. The MCP server prefers headless whenever it is supported. May be removed in a future release"headless"
headlessEntrystringNoPath to the compiled automated runtime entry point that exports invokeHeadless"dist/headless.js"
{
  "agents": {
    "version": "1.0.0",
    "headless": true,
    "invokable": true,
    "modes": ["one-way", "two-way"],
    "defaultMode": "two-way",
    "timeoutMS": 12000,
    "executionModes": ["windowed", "headless"],
    "headlessEntry": "dist/headless.js"
  }
}

Workers Object

Desktop only

Declares packaged .NET console workers, keyed by a stable worker ID that you pass to toolboxAPI.workers.connect(). Declarations are metadata only — they identify an exact package, not an executable path or shell command. Using workers requires features.minAPI to be set in package.json.

FieldTypeRequiredDescriptionSample
kindstringYesWorker type. Currently only "dotnet-tool""dotnet-tool"
packageIdstringYesNuGet package ID of the .NET tool"Contoso.SqlWorker"
packageVersionstringYesExact NuGet version. Ranges, floating versions, and tags are not allowed"1.4.2"
commandstringYesCommand name declared by the NuGet tool package (ToolCommandName)"contoso-sql-worker"
dotnet.targetFrameworkstringYesWorker executable target framework: "net8.0", "net9.0", or "net10.0""net8.0"
dotnet.minimumRuntimeVersionstringYesStable major.minor.patch version matching the target framework"8.0.0"
dotnet.rollForwardstringNoRuntime roll-forward policy: "Disable", "Latest", "Minor", or "Major". Defaults to "Major" when omitted; explicit null, empty, or unknown values are invalid"Major"
platformsstring[]YesUnique platform aliases: "all", "windows-x64", "windows-arm64", "macos-x64", "macos-arm64", "linux-x64", "linux-arm64". "all" must appear alone and refers to PPTB's officially supported platform matrix["all"]
{
  "workers": {
    "engine": {
      "kind": "dotnet-tool",
      "packageId": "Contoso.SqlWorker",
      "packageVersion": "1.4.2",
      "command": "contoso-sql-worker",
      "dotnet": {
        "targetFramework": "net8.0",
        "minimumRuntimeVersion": "8.0.0",
        "rollForward": "Major"
      },
      "platforms": ["all"]
    }
  }
}

See .NET Workers for packaging, the worker protocol, and runtime behaviour.

Publishing

pptb.config.json must be included in your published npm package, next to package.json. Add it to the files array:

{
  "files": ["dist", "npm-shrinkwrap.json", "pptb.config.json"]
}

TypeScript Types

@pptb/types ships type definitions for every section of the file:

import type {
  PPTBConfig,
  InvocationConfig,
  AgentsConfig,
  AgentInvocationMode,
  AgentExecutionMode,
  JsonSchemaObject,
  JsonSchemaProperty,
  CapabilityTag,
  KnownCapabilityTag,
  WorkerDeclaration,
  WorkerTargetFramework,
  WorkerRollForward,
  WorkerPlatform,
} from '@pptb/types/pptbConfig'

Full Example

{
  "invocation": {
    "version": "1.0.0",
    "capabilities": ["fetchxml"],
    "prefill": {
      "properties": {
        "entityName": {
          "type": "string",
          "title": "Table",
          "description": "Logical name of the table to query",
          "required": true
        },
        "attributes": {
          "type": "array",
          "items": { "type": "string" },
          "title": "Columns",
          "description": "Logical names of the columns to include"
        }
      }
    },
    "returnTopic": {
      "properties": {
        "result": { "type": "object" },
        "status": { "type": "string", "enum": ["success", "cancelled", "error"] },
        "error": { "type": "string" }
      }
    }
  },
  "agents": {
    "version": "1.0.0",
    "headless": true,
    "invokable": true,
    "modes": ["one-way", "two-way"],
    "defaultMode": "two-way",
    "timeoutMS": 12000,
    "executionModes": ["windowed", "headless"],
    "headlessEntry": "dist/headless.js"
  },
  "workers": {
    "engine": {
      "kind": "dotnet-tool",
      "packageId": "Contoso.SqlWorker",
      "packageVersion": "1.4.2",
      "command": "contoso-sql-worker",
      "dotnet": {
        "targetFramework": "net8.0",
        "minimumRuntimeVersion": "8.0.0"
      },
      "platforms": ["all"]
    }
  }
}

Was this page helpful?