Skip to main content
Glama

clear_user_identity

Reset user identity to anonymous mode on DollhouseMCP, enabling dynamic persona switching and privacy restoration for AI interactions.

Instructions

Clear user identity and return to anonymous mode

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes the core logic of clearing the user identity by calling setUserIdentity(null), which unsets the DOLLHOUSE_USER and DOLLHOUSE_EMAIL environment variables via process.env.
    clearUserIdentity(): void { this.setUserIdentity(null); }
  • Registers the 'clear_user_identity' MCP tool, providing its name, description, empty input schema, and a handler function 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() }
  • Zod schema definition for the input arguments of the clear_user_identity tool (empty object schema since the tool takes no parameters).
    export const ClearUserIdentityArgsSchema = z.object({});
  • Helper method used by clearUserIdentity to set or clear user identity by manipulating process.env variables for 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; } }
  • TypeScript interface definition for the server's clearUserIdentity method, part of IToolHandler.
    clearUserIdentity(): Promise<any>;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DollhouseMCP/DollhouseMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server