clear_user_identity
Remove user identity and restore anonymous mode on DollhouseMCP, enabling dynamic AI persona management without personal data.
Instructions
Clear user identity and return to anonymous mode
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/persona/PersonaManager.ts:348-350 (handler)Executes the core logic for the clear_user_identity tool by calling setUserIdentity(null) to remove user identity environment variables.clearUserIdentity(): void { this.setUserIdentity(null); }
- src/server/tools/UserTools.ts:42-52 (registration)Registers the clear_user_identity tool definition and thin handler that delegates to the server's clearUserIdentity method.{ tool: { name: "clear_user_identity", description: "Clear user identity and return to anonymous mode", inputSchema: { type: "object", properties: {}, }, }, handler: () => server.clearUserIdentity() }
- src/types/mcp.ts:59-59 (schema)Zod schema defining the input arguments for the clear_user_identity tool (empty object as no parameters required).export const ClearUserIdentityArgsSchema = z.object({});
- Supporting method that sets or clears user identity by updating internal state and environment variables DOLLHOUSE_USER and DOLLHOUSE_EMAIL.setUserIdentity(username: string | null, email?: string): void { this.currentUser = username; if (username) { process.env.DOLLHOUSE_USER = username; if (email) { process.env.DOLLHOUSE_EMAIL = email; } } else { delete process.env.DOLLHOUSE_USER; delete process.env.DOLLHOUSE_EMAIL; } }