This guide is for tool authors who want their PPTB tool to be callable by external MCP clients.
PPTB now exposes an explicit agents contract in pptb.config.json.
invocationremains the contract for PPTB-to-PPTB tool launching.agentsis the contract for MCP-based external automation.- Both contracts can coexist in the same tool.
Add an agents section next to invocation.
{
"invocation": {
"version": "1.0.0",
"prefill": {
"properties": {
"entityName": { "type": "string" }
}
},
"returnTopic": {
"properties": {
"selectedId": { "type": "string" }
}
}
},
"agents": {
"version": "1.0.0",
"invokable": true,
"modes": ["one-way", "two-way"],
"defaultMode": "two-way",
"timeoutMS": 12000
}
}Guidance:
- Set
invokable: trueonly when the tool is ready to be called by external agents. - Use
modesto list the invocation styles the tool can actually support. - Keep
defaultModealigned with the most reliable call path. - Increase
timeoutMSfor slower two-way flows.
one-waycalls should accept the launch and complete quickly.two-waycalls should eventually return data via the normal tool return path.toolboxAPI.invocation.getLaunchContext()should still be used for local tool state.toolboxAPI.invocation.returnData()remains the handoff mechanism for returning values.
- Open the MCP Inspector and connect to the PPTB MCP server.
- Run
list-toolsand confirm the tool appears. - Confirm the tool description shows supported modes and the default mode.
- Invoke the tool with no
__pptbblock and confirm the default mode is used. - Invoke the tool with
__pptb.mode = "one-way"and confirm the call is accepted immediately. - Invoke the tool with
__pptb.mode = "two-way"and confirm the returned payload matches the declared schema. - Try an unsupported mode and confirm the server returns a deterministic error.
- Declaring
invokable: truewithout a matchinginvocation.prefill/returnTopicshape. - Claiming support for
one-waywhen the tool still needs a return payload. - Using
agents.timeoutMSthat is too short for a real user flow. - Returning fields that are not part of
returnTopicfor two-way flows.