Appearance
Agent Integration
Power Platform ToolBox lets tool developers expose selected tools to AI assistants through its built-in MCP server. As the developer, you control whether your tool is discoverable by an agent, what input it accepts, what results it returns, and whether it supports interactive use, automated (headless) use, or both.
Agent integration is three steps: declare an invocation contract, mark the tool as invokable by agents, and — if you want automated (non-UI) execution — add a headless runtime entry point.
MCP contract layers
The contract that governs agent integration has two distinct layers:
- Invocation layer — describes the input payload and the structured result, the same contract used by inter-tool invocation.
- Agents layer — declares the tool's availability to AI assistants and its MCP behavior.
Execution styles
| User-facing term | MCP value | Purpose |
|---|---|---|
| Interactive tool run | executionMode: "windowed" | PPTB opens the tool's UI |
| Automated tool run | executionMode: "headless" | PPTB runs the tool without a UI |
Configuration requirements
Add invocation and agents objects to pptb.config.json. Key agents fields:
invokable— exposes the tool through MCP discovery.modes— supports"one-way"(fire-and-forget) or"two-way"(result-returning).executionModes— lists which execution modes the tool supports.headlessEntry— points to the automated runtime's entry point.timeoutMS— a timeout hint for result-returning calls.
Automated runtime
For headless execution, export an invokeHeadless(input, context) function from a discoverable file. PPTB resolves the entry point in this order:
- The path specified in
agents.headlessEntry. dist/headless.js.headless.js.package.json'smainfield.
Design principles
For a tool that supports both interactive and automated execution:
- Accept identical input shapes across the UI path and the automated path.
- Return consistent result shapes regardless of which execution method was used.
- Treat automated runs as task-oriented operations, not as a scripted UI session.
- Use progress updates and structured logging so an agent (and a human debugging it) can follow what happened.
- Exclude secrets from logs and payloads.
Validation steps
Before publishing a tool with agent integration:
- Validate the configuration locally.
- Confirm MCP discovery behavior — the tool shows up where it should.
- Test both call modes (interactive and, if supported, headless).
- Verify the automated runtime's payload matches the declared
returnTopic. - Use the MCP Inspector for manual testing.
Checklist
- [ ]
pptb.config.jsondeclares both aninvocationobject and anagentsobject. - [ ]
agents.invokableis set intentionally —trueonly for tools meant to be agent-discoverable. - [ ]
agents.executionModesaccurately lists the modes the tool actually supports. - [ ] If headless execution is supported,
invokeHeadless(input, context)is exported and resolvable viaheadlessEntry,dist/headless.js,headless.js, orpackage.json.main(in that order). - [ ] Input/output shapes are identical (or documented as equivalent) across windowed and headless execution.
- [ ] No secrets appear in logs or payloads.
- [ ] The tool has been tested with the MCP Inspector before publishing.