Skip to main content
Glama

get_user_identity

Retrieve current user identity details to enable personalized AI persona management within the DollhouseMCP server's dynamic model context system.

Instructions

Get current user identity information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration function getUserTools that defines and returns the tool definitions and handlers for user identity tools, including get_user_identity. Note: deprecated per ServerSetup comments.
    export function getUserTools(server: IToolHandler): Array<{ tool: ToolDefinition; handler: any }> { return [ { tool: { name: "set_user_identity", description: "Set your username for persona attribution and collection participation", inputSchema: { type: "object", properties: { username: { type: "string", description: "Your username (alphanumeric, hyphens, underscores, dots)", }, email: { type: "string", description: "Your email address (optional)", }, }, required: ["username"], }, }, handler: (args: any) => server.setUserIdentity(args.username, args?.email) }, { tool: { name: "get_user_identity", description: "Get current user identity information", inputSchema: { type: "object", properties: {}, }, }, handler: () => server.getUserIdentity() }, { tool: { name: "clear_user_identity", description: "Clear user identity and return to anonymous mode", inputSchema: { type: "object", properties: {}, }, }, handler: () => server.clearUserIdentity() } ]; }
  • The specific tool definition, schema, and handler lambda for 'get_user_identity' tool. The handler delegates to server.getUserIdentity()
    tool: { name: "get_user_identity", description: "Get current user identity information", inputSchema: { type: "object", properties: {}, }, }, handler: () => server.getUserIdentity() },
  • Input schema for get_user_identity tool (empty object, no parameters)
    tool: { name: "get_user_identity", description: "Get current user identity information", inputSchema: { type: "object", properties: {}, }, },
  • Core implementation logic for retrieving user identity from environment variables (DOLLHOUSE_USER and DOLLHOUSE_EMAIL). Called by server.getUserIdentity()
    getUserIdentity(): { username: string | null; email: string | null } { return { username: process.env.DOLLHOUSE_USER || null, email: process.env.DOLLHOUSE_EMAIL || null }; }
  • IToolHandler interface defining the getUserIdentity method signature (returns Promise<any>)
    setUserIdentity(username: string, email?: string): Promise<any>; getUserIdentity(): Promise<any>; clearUserIdentity(): Promise<any>;
  • Location where user tools registration was previously performed (now deprecated and commented out, replaced by dollhouse_config)
    // DEPRECATED: Old user tools - replaced by dollhouse_config // Comment out to remove from tool list, but keep for reference during transition // this.toolRegistry.registerMany(getUserTools(instance));

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