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
| Name | Required | Description | Default |
|---|---|---|---|
| active | No | Filter by active users only | |
| page_size | No | Number of results per page (optional) |
Implementation Reference
- src/sde_mcp_server/tools/users.py:10-22 (handler)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)
- src/sde_mcp_server/tools/__init__.py:7-7 (registration)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 *
- src/sde_mcp_server/server.py:296-296 (registration)Import of tools package in server.py, triggering the import chain that registers all tools including list_users.from . import tools # noqa: F401