Skip to main content
Glama

list_users

Retrieve a list of all users in the SD Elements platform, with options to filter by active status and control results per page for efficient user management.

Instructions

List all users in SD Elements

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activeNoFilter by active users only
page_sizeNoNumber of results per page (optional)

Implementation Reference

  • The handler function for the 'list_users' tool. It is decorated with @mcp.tool() for automatic registration and schema inference from signature and docstring. Implements listing users via API with optional filters.
    @mcp.tool() async def list_users(ctx: Context, page_size: Optional[int] = None, active: Optional[bool] = None) -> str: """List all users""" global api_client if api_client is None: api_client = init_api_client() params = {} if page_size is not None: params["page_size"] = page_size if active is not None: params["is_active"] = active result = api_client.list_users(params) return json.dumps(result, indent=2)
  • Import of users module in tools/__init__.py, which loads and registers the list_users tool when the tools package is imported.
    from .users import *
  • Import of tools package in server.py, triggering the import chain that registers all tools including list_users.
    from . import tools # noqa: F401

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/geoffwhittington/sde-mcp'

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