get_users
Retrieve users from the Devici platform with pagination controls to manage and access user data efficiently.
Instructions
Get users from Devici with pagination
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_users"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| page | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:19-24 (handler)The primary MCP tool handler for 'get_users', registered via @mcp.tool() decorator. Executes the tool logic by calling the API client.
@mcp.tool() async def get_users(limit: int = 20, page: int = 0) -> str: """Get users from Devici with pagination""" async with create_client_from_env() as client: result = await client.get_users(limit=limit, page=page) return str(result) - Supporting API client method that performs the HTTP GET request to '/users/' endpoint to retrieve users with pagination.
async def get_users(self, limit: int = 20, page: int = 0) -> Dict[str, Any]: """Get all users.""" params = {"limit": limit, "page": page} return await self._make_request("GET", "/users/", params=params)