list_beta_testers
List TestFlight beta testers filtered by app, group, or email. Returns tester details including name, email, invite type, and state.
Instructions
List beta testers. Filter by app, group, or email. Returns tester name, email, invite type, and state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | No | Filter testers by app ID | |
| group_id | No | Filter testers by beta group ID | |
| No | Filter by tester email address | ||
| limit | No | Maximum number of testers to return (default: 50) |
Implementation Reference
- src/index.ts:64-74 (registration)Registration of the 'list_beta_testers' tool via server.tool(), wiring the schema and handler together.
server.tool( "list_beta_testers", "List beta testers. Filter by app, group, or email. Returns tester name, email, invite type, and state.", listTestersSchema.shape, async (args) => { const result = await handleListTesters(client, args); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } ); - src/tools/list-testers.ts:26-45 (handler)Handler function handleListTesters that orchestrates the beta tester listing logic, calling the API and mapping results.
export async function handleListTesters( client: AppStoreConnectClient, args: z.infer<typeof listTestersSchema> ) { const { testers } = await listBetaTesters(client, { appId: args.app_id, groupId: args.group_id, email: args.email, limit: args.limit, }); return testers.map((t) => ({ id: t.id, firstName: t.attributes.firstName, lastName: t.attributes.lastName, email: t.attributes.email, inviteType: t.attributes.inviteType, state: t.attributes.state, })); } - src/tools/list-testers.ts:5-24 (schema)Zod schema for input validation: optional app_id, group_id, email, and limit fields.
export const listTestersSchema = z.object({ app_id: z .string() .optional() .describe("Filter testers by app ID"), group_id: z .string() .optional() .describe("Filter testers by beta group ID"), email: z .string() .optional() .describe("Filter by tester email address"), limit: z .number() .min(1) .max(200) .optional() .describe("Maximum number of testers to return (default: 50)"), }); - src/api/testers.ts:12-34 (helper)API helper function listBetaTesters that builds query parameters, calls the App Store Connect API's /betaTesters endpoint, and returns the result.
export async function listBetaTesters( client: AppStoreConnectClient, options?: ListTestersOptions ): Promise<{ testers: BetaTester[]; included: JsonApiResource[] }> { const params: Record<string, string> = { "fields[betaTesters]": "firstName,lastName,email,inviteType,state", limit: String(options?.limit ?? 50), sort: options?.sort ?? "lastName", }; if (options?.appId) { params["filter[apps]"] = options.appId; } if (options?.groupId) { params["filter[betaGroups]"] = options.groupId; } if (options?.email) { params["filter[email]"] = options.email; } const response = await client.requestAll<BetaTester>("/betaTesters", params); return { testers: response.data, included: response.included }; }