Skip to main content
Glama
SLdragon

MCP User Profile Management Server

by SLdragon

list_users

Retrieve all user profiles stored in the system to view and manage user information.

Instructions

List all user profiles currently stored in the system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_users' tool. It imports storage dynamically, retrieves the list of users, formats them in a JSON response, and returns a success message or error.
    async () => { try { const { storage } = await import('../storage.js'); return utils.createSuccessResponse( `All user profiles (${storage.users.length} total):\n${JSON.stringify(storage.users, null, 2)}` ); } catch (error) { return utils.createErrorResponse(`Error listing users: ${error.message}`); } }
  • Registers the 'list_users' tool on the MCP server using server.tool(), providing the tool name, description, empty input schema (no parameters required), and the handler function.
    return server.tool( "list_users", "List all user profiles currently stored in the system", {}, async () => { try { const { storage } = await import('../storage.js'); return utils.createSuccessResponse( `All user profiles (${storage.users.length} total):\n${JSON.stringify(storage.users, null, 2)}` ); } catch (error) { return utils.createErrorResponse(`Error listing users: ${error.message}`); } } );
  • index.js:17-17 (registration)
    Top-level call to listUsersTool(server) in the main server setup, which triggers the registration of the 'list_users' tool.
    listUsersTool(server);

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/SLdragon/mcp-elicitation-server'

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