Deploy an Azure Function app and register it in the PlayFab Game Manager under Automation > CloudScript > Functions, providing the function name and its Azure Function URL
In the Azure Function code, read the incoming PlayFab context object (FunctionContext) which contains the caller's entity profile, title ID, and any custom arguments passed by the client
Use the PlayFab Server SDK within the function (authenticated with the title's secret key) to perform privileged operations such as granting items, updating statistics, or writing player data
Call the function from a game client using the ExecuteFunction API with the function name and a FunctionParameter object containing the arguments
Register the function as a PlayStream event rule trigger or a scheduled task in Game Manager to invoke it automatically on game events without client calls
Return a result object from the function; the client receives it in the ExecuteFunction response FunctionResult field
Known gotchas
Azure Functions mode requires the function URL to be reachable from PlayFab's servers; local development URLs or functions behind VPNs will not work for production rule triggers
The PlayFab context injected into the function uses the calling entity's identity — do not trust client-supplied arguments for sensitive operations; validate them against server state
Classic CloudScript (JavaScript-based) and Azure Functions CloudScript are separate systems; functions registered in one mode are not available in the other
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp