resend_user_invite
Resend a pending user invite email for an invite that has not been accepted. Sends a fresh email without altering the invite details.
Instructions
Resend the email for a pending invite that has not been accepted, unlike invite_user which creates a new invite. This sends a fresh email without modifying the invite record, expiry, or role; use get_user_invite first if you are unsure whether the invite still exists and list_user_invites to discover invite_ids.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invite_id | Yes | The invite ID to resend |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |
Implementation Reference
- src/tools/users.tools.ts:401-424 (handler)The MCP tool handler for 'resend_user_invite'. It registers the tool with the MCP server, uses the schema for input validation (invite_id), calls service.users.resendUserInvite(params.invite_id), and returns a success message.
// Phase 1: Resend user invite tool server.tool( "resend_user_invite", "Resend the email for a pending invite that has not been accepted, unlike invite_user which creates a new invite. This sends a fresh email without modifying the invite record, expiry, or role; use get_user_invite first if you are unsure whether the invite still exists and list_user_invites to discover invite_ids.", USERS_TOOL_SCHEMAS.resendUserInvite, async (params) => { await service.users.resendUserInvite(params.invite_id); return { content: [ { type: "text", text: JSON.stringify( { message: `Successfully resent invite ${params.invite_id}`, success: true, }, null, 2, ), }, ], }; }, ); - src/tools/users.tools.ts:127-129 (schema)The Zod schema for the resendUserInvite tool, defining the 'invite_id' input parameter as a required string.
resendUserInvite: { invite_id: z.string().describe("The invite ID to resend"), }, - src/tools/users.tools.ts:401-424 (registration)The tool is registered via server.tool('resend_user_invite', ...) inside the registerUsersTools function.
// Phase 1: Resend user invite tool server.tool( "resend_user_invite", "Resend the email for a pending invite that has not been accepted, unlike invite_user which creates a new invite. This sends a fresh email without modifying the invite record, expiry, or role; use get_user_invite first if you are unsure whether the invite still exists and list_user_invites to discover invite_ids.", USERS_TOOL_SCHEMAS.resendUserInvite, async (params) => { await service.users.resendUserInvite(params.invite_id); return { content: [ { type: "text", text: JSON.stringify( { message: `Successfully resent invite ${params.invite_id}`, success: true, }, null, 2, ), }, ], }; }, ); - The service method resendUserInvite that performs the actual HTTP POST to /admin/users/invites/{inviteId}/resend on the Portkey API.
async resendUserInvite(inviteId: string): Promise<{ success: boolean }> { await this.post( `/admin/users/invites/${this.encodePathSegment(inviteId)}/resend`, ); return { success: true }; }