We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/akiojin/playfab-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import { PlayFabAdminAPI } from "../../config/playfab.js";
import { callAdminAPI, addCustomTags } from "../../utils/playfab-wrapper.js";
import { PlayFabHandler } from "../../types/index.js";
import { GetPlayersInSegmentsParams, GetPlayersInSegmentsResult } from "../../types/handler-types.js";
export const GetPlayersInSegments: PlayFabHandler<GetPlayersInSegmentsParams, GetPlayersInSegmentsResult> = async (params) => {
const request = addCustomTags({
SegmentId: params.SegmentId,
SecondsToLive: params.SecondsToLive,
MaxBatchSize: params.MaxBatchSize,
ContinuationToken: params.ContinuationToken
});
const result = await callAdminAPI<PlayFabAdminModels.GetPlayersInSegmentRequest, PlayFabAdminModels.GetPlayersInSegmentResult>(
PlayFabAdminAPI.GetPlayersInSegment,
request,
'GetPlayersInSegment'
);
return {
success: true,
playerProfiles: result.PlayerProfiles || [],
continuationToken: result.ContinuationToken,
profilesInSegment: result.ProfilesInSegment || 0
};
};