In Azure, create a Function App (Node.js or C#) and deploy a handler function; configure it with the PlayFab extension bundle so the context object is automatically populated with player and title info.
In Game Manager under Automation > CloudScript > Functions, register the Azure Function URL and assign it a function name used for invocation.
From a client, call ExecuteFunction with the registered function name and a JSON arguments object; the function receives player entity context without requiring a separate auth call.
Inside the function, use the PlayFab server SDK (or direct API calls with the title secret key from environment variables) to read/write player data, grant items, or update statistics.
Return a structured result object from the function; the client receives it in the FunctionResult field of the ExecuteFunction response.
Set up Revision Rules in Game Manager to control which function revision is live, enabling staged rollouts of logic changes.
Known gotchas
Never embed the title secret key in client-side code; it must live only in Azure Function application settings as an environment variable.
Cold start latency on Azure Consumption plan can add hundreds of milliseconds; use a Premium plan or pre-warm functions for latency-sensitive live ops.
PlayFab's legacy CloudScript (JavaScript) and the newer Azure Functions integration are separate systems; mixing invocation methods in the same title can cause confusion about which version is executing.
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