search_users
Find users in the Devici threat modeling platform by searching specific fields with text queries to manage user access and permissions.
Instructions
Search users by field and text
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | Yes | ||
| text | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:35-40 (handler)The MCP tool handler for 'search_users'. It is registered via @mcp.tool() decorator and executes the tool logic by creating an API client context and calling its search_users method, converting the result to string.@mcp.tool() async def search_users(field: str, text: str) -> str: """Search users by field and text""" async with create_client_from_env() as client: result = await client.search_users(field, text) return str(result)
- Supporting method in the DeviciAPIClient class that implements the core search functionality by making an authenticated GET request to the Devici API's user search endpoint.async def search_users(self, field: str, text: str) -> Dict[str, Any]: """Search users by field and text.""" return await self._make_request("GET", f"/users/search/field={field}&text={text}")